test: the desks run through a real store (PR 1 of #4) #7
Loading…
Reference in a new issue
No description provided.
Delete branch "mercurius/4-pr1-test-store"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (test): the CMD division's desks are tested through a real reckon-db store, as mcl-bookclub's are. This is PR 1 of #4 (gap table H.1). Every later parity PR uses the fixture.
Refs #4
What changes
HostBookclub.TestStore(apps/host_bookclub/test/support, compiled for:testonly) portshost_bookclub_test_store.erl. It opens the store the desks dispatch to, the way the facade does, under a freshMCL_DATA_DIR, and reads streams back as#event{}records.reckon_dbis a test-only dependency at the facade's~> 5.11.division_boundary_test.exs): nothing in host_bookclub/lib names esqlite, macula or mcl_om.Where it differs from mcl-bookclub, and why
dispatch/1takes a params map until PR 3.*_store_test.exsfiles withasync: false, so the pure suites stay async.mix test, the fixture reuses the store the facade already opened, andstop/1closes only a store it opened itself.validate/1refusal. mcl-bookclub asserts only{error, _}, a looseness that two mutants survived.Checks
Run on msi00 in the ci image:
--warnings-as-errors, credo--strict: cleanmix test: 0 failures, rc=014 mutants, all killed (initiate, archive, plan_party, the guards, validation and the boundary).
No CI yet: Actions are off on this repo until PR 6's GO.
TestStore.stream/1 called :reckon_db_streams.read/5, which Dialyzer cannot see: reckon_db is outside the PLT (no debug_info). It now reads through :evoq_event_store.read/5, the path an aggregate loads from, so the store cases read each event as evoq's flat map instead of reckon_gater's #event{} record, and the record macro is gone. Refs macula-services/mcl-bookclub-phoenix#4Landed: phoenix main is
cbe8061c4d, which merges this PR's passed head8465878a(PASS r=2 Uranus) on maine9cc2372; CI 6140 + 6141 on that tip. Closed rather than merged: this repository does not allow the manually-merged style.Pull request closed