atproto git client
atgc plan testing.md
19 kB
Markdown
at main


id: testing title: A defect in a sequence of commands is caught here, not in production status: open repos: [atgc] dependsOn: [] exitCriterion: > Every command family has a flow test driving the real binary against a mock service, and the mock behaves the way the real service does. #

testing #

Unit tests cannot see the thing that actually goes wrong here, which is the request side of a sequence: a round appended to the wrong record, a chain whose dependentOn points outside its own batch, a write made with the wrong account's credentials, a read-modify-write that drops the rounds it was not editing.

So tests/support/ drives the built binary against mock services on loopback ports. Two properties make it hermetic: Command::env is not unsafe, so a child may have its own HOME, and jacquard restores an unexpired fixture session without contacting anything.

The argument against mocking a parser is unchanged and is in docs/testing.md. A model of the service that reads these records is a third thing again, and tests/support/appview.rs is the first of them. What is open is the coverage that is missing, how far that model reaches, and one way the mock is not faithful.

What it needs #

Done #