test_storage_integration.cpp¶
tests/integration/test_storage_integration.cpp
@file test_storage_integration.cpp @brief Integration tests for storage wiring into core engine.
Owners: @tvanfossen
test_complete_delegation
static bool test_complete_delegation(const char *del_id, const char *status, const char *summary, void *ud)
Complete delegation callback.
tests/integration/test_storage_integration.cpp:87
Result: absent
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-STOR-002 | inferred | test_complete_delegation → complete_delegation → execute |
| REQ-STOR-003 | inferred | test_complete_delegation → complete_delegation → utc_timestamp |
| REQ-STOR-005 | inferred | test_complete_delegation → complete_delegation |
Source · 9 lines
static bool test_complete_delegation(
const char* del_id, const char* status,
const char* summary, void* ud) {
auto* h = static_cast<StorageHarness*>(ud);
h->complete_delegation_calls++;
return h->storage.complete_delegation(
del_id, status,
summary ? std::optional<std::string>(summary) : std::nullopt);
}Activity · 3 steps
test_create_delegation
static bool test_create_delegation(const char *parent_id, const char *del_tier, const char *target_tier, const char *task, int max_turns, std::string &del_id, std::string &child_id, void *ud)
Create delegation callback that delegates to real storage.
tests/integration/test_storage_integration.cpp:67
Result: absent
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-STOR-002 | inferred | test_create_delegation → create_delegation → execute |
| REQ-STOR-003 | inferred | test_create_delegation → create_delegation → create_conversation |
| REQ-STOR-005 | inferred | test_create_delegation → create_delegation |
Source · 14 lines
static bool test_create_delegation(
const char* parent_id, const char* del_tier,
const char* target_tier, const char* task,
int max_turns, std::string& del_id,
std::string& child_id, void* ud) {
auto* h = static_cast<StorageHarness*>(ud);
h->create_delegation_calls++;
bool ok = h->storage.create_delegation(
parent_id, del_tier, target_tier, task, max_turns,
del_id, child_id);
h->last_delegation_id = del_id;
h->last_child_id = child_id;
return ok;
}Activity · 6 steps
test_save_snapshot
static bool test_save_snapshot(const char *conv_id, const char *msgs_json, void *ud)
Snapshot callback that delegates to real storage.
tests/integration/test_storage_integration.cpp:55
Result: absent
Verifies
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-STOR-002 | inferred | test_save_snapshot → save_snapshot → execute |
| REQ-STOR-003 | inferred | test_save_snapshot → save_snapshot |
Source · 6 lines
static bool test_save_snapshot(
const char* conv_id, const char* msgs_json, void* ud) {
auto* h = static_cast<StorageHarness*>(ud);
h->snapshot_calls++;
return h->storage.save_snapshot(conv_id, msgs_json);
}