ExAgent. Store. ContractCase
(ExAgent v3.0.0)
View Source
ExUnit snapshot contract tests for an ExAgent.Store adapter.
Stability — Candidate.
Use this module in a dedicated ExUnit.Case after any module tags.
Return {:ok, store: {MyStore, config}} from a module-level setup with
an empty, unscoped test Store.
Own the test resources in setup and release them with ExUnit supervision
or on_exit/1. The descriptor must work from tasks spawned by the test.
The tests cover agent snapshot round-trips, deletion, inventory and namespace
isolation. They check revision rejection and competing writes when
ExAgent.Store.capabilities/1 reports snapshot_cas: true. They exercise Session
when the save and load callbacks are exported, and deletion when available.
Setup rejects an atomic continuation declaration without the required callbacks.
Header pagination runs when the descriptor supports ExAgent.Store.list_agent_headers/2.
An explicit {:error, :unsupported_store_capability} means headers are unavailable.
Verify adapter-specific expiry with backend tests. Atomic C7 is qualified by the suites for the bundled Stores.
Summary
Functions
Register the Store tests in a module that uses ExUnit.Case.
Functions
Register the Store tests in a module that uses ExUnit.Case.