test: Extract shared conformance-test scaffolding into a common module #81
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rosa/vernier!81
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "test/shared-conformance-scaffolding"
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?
The three repository-conformance suites in
crates/infra/tests/each carried their own byte-identical copy of theboth_adapters!macro plus near-identicalcreate_user_request()/seed_user()helpers, because integration-test binaries cannot share code without a common module.This moves that scaffolding into
crates/infra/tests/common/mod.rs(the standardtests/common/mod.rspattern):both_adapters!moves unchanged and is re-exported withpub(crate) use, so each suite invokes it exactly as before.create_user_request(name, email)standardises on the parameterised form the confirmation suite already used.seed_user(repo, name, email)now takes the identity, so it can seed multiple distinct users; the post and authorization-code suites pass the previous fixed values, and the confirmation suite's scoped-displacement behaviour uses it for its two users (its other behaviour composescreate_user_requestdirectly, since it needs the email-confirmation id back).Behaviour functions stay in their own suite files; the
pg_*/mem_*test-name set is identical before and after (22 tests), and every helper is used by all three binaries, so no dead-code warnings. Thecimise task passes.Closes #78