Skip to content

sgns::neoswarm::storage::test

Classes

Name
class sgns::neoswarm::storage::test::GcsGlobalDbTest
Fixture that owns a per-test temp directory under std::filesystem::temp_directory_path() and removes it in TearDown.

Functions

Name
TEST_F(GcsGlobalDbTest , DefaultConstructedIsNotRunning )
Default-constructed component: inert, IsRunning() false, Shutdown() a safe no-op.
TEST_F(GcsGlobalDbTest , InitializeWithoutSdkFails )
Initialize() without GeniusSDK initialized must fail with the specific Error::SdkNotInitialized code. This binary never calls GeniusSDKInit, so GeniusSDKGetNode() returns nullptr throughout the test.
TEST_F(GcsGlobalDbTest , LifecycleWithInjectedPubSub )
Full lifecycle with an injected pubsub: GlobalDB::New succeeds, Start is called, IsRunning() becomes true, the db directory appears on disk, and Shutdown() returns the component to a stopped state with the io thread joined.
TEST_F(GcsGlobalDbTest , DoubleInitializeFails )
Double Initialize() must fail the second call with Error::GcsDbError (programmer error — surfaced, not silently swallowed).

Functions Documentation

function TEST_F

TEST_F(
    GcsGlobalDbTest ,
    DefaultConstructedIsNotRunning 
)

Default-constructed component: inert, IsRunning() false, Shutdown() a safe no-op.

function TEST_F

TEST_F(
    GcsGlobalDbTest ,
    InitializeWithoutSdkFails 
)

Initialize() without GeniusSDK initialized must fail with the specific Error::SdkNotInitialized code. This binary never calls GeniusSDKInit, so GeniusSDKGetNode() returns nullptr throughout the test.

function TEST_F

TEST_F(
    GcsGlobalDbTest ,
    LifecycleWithInjectedPubSub 
)

Full lifecycle with an injected pubsub: GlobalDB::New succeeds, Start is called, IsRunning() becomes true, the db directory appears on disk, and Shutdown() returns the component to a stopped state with the io thread joined.

function TEST_F

TEST_F(
    GcsGlobalDbTest ,
    DoubleInitializeFails 
)

Double Initialize() must fail the second call with Error::GcsDbError (programmer error — surfaced, not silently swallowed).


Updated on 2026-10-09 at 03:59:42 +0000