Forge.AnvilBridge.Mock (Forge v0.1.1)

View Source

Mock adapter for AnvilBridge used in testing.

Maintains in-memory state for published samples and labels. Provides deterministic behavior for testing without requiring Anvil.

Summary

Functions

Add mock labels for a sample.

Returns a specification to start this module under a supervisor.

Mark a job as completed.

Get the current state of the mock adapter.

Reset the mock adapter state.

Start the mock adapter agent.

Functions

add_labels(sample_id, labels)

Add mock labels for a sample.

Useful for testing label retrieval and sync.

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

complete_job(job_id)

Mark a job as completed.

Useful for testing queue statistics.

get_state()

Get the current state of the mock adapter.

Useful for test assertions.

reset()

Reset the mock adapter state.

Useful for test isolation.

start_link(opts \\ [])

Start the mock adapter agent.

This is typically called automatically in test setup.