test(e2e): cover the oci catalog's setup group
What this adds
The two automatable rows of the OCI catalog's Setup and configuration
group, authored against the pattern registry and flipped to implemented:
| Scenario | Priority | Covered by |
|---|---|---|
e2e.oci.setup.create-repository |
critical | TestRepositoryIsCreatedAndUsable |
e2e.oci.setup.delete-repository |
high | TestRepositoryDeleteHonorsDestructiveIntent |
They live in a new client surface, e2e/bootstrap/oci/, because the rows
assert no authorization and the bootstrap profile is the cheaper rig. The
profile's harness surface keeps the route contracts it already had; these
two files hold nothing but the scenarios, per e2e/README.md's rule.
create-repository reads the 201 off CreateRepositoryStatus rather than
the mapping helper, which replays a conflict to a GET and so cannot tell a
create from a repository that was already there. Then both halves of the
format filter, then an oras push — which is what makes "immediately usable
as a push target" an assertion rather than a claim about the status code.
delete-repository covers the destructive guard's 400 across six
spellings including an omitted parameter, the 204 under either value with
the name reusable at once, the 409 with the artifact pulled back to prove
the images are intact, and the 202 with what it promises: pushes and pulls
fail and the repository leaves the listing.
registry.Client gains DeleteRepository and DeleteRepositoryRawQuery. The
raw-query variant is what lets a test spell the parameter the ways the guard
rejects, an omitted one included, which a typed bool cannot express.
What is deliberately not asserted
Two arms of the delete row, both named here so a reader does not take the
implemented status for full coverage of that cell:
- The #371
retry. That emptying a hosted container repository through the
/v2/deletes leaves the409standing needs manifest and blob deletes, which no client in this tree has. That capability belongs with thelifecyclerows that are about deletion, not built inside a setup-group test. - The name reservation, caught at an instant. The row says a create at the
name returns
409until the removal finishes. The purge worker runs in the service's own binary andlifecycle.retention_windowdefaults to0s, so the window is milliseconds and a hard assertion would flake. The test polls for the release instead and logs whether a409was observed. On the verification run below it was, on attempt 2.
The group's other two rows stay not started: create-repository-ui has no
UI driver in this tree, and update-visibility defers itself to GA, since
closed beta is private-only and there is no visibility to flip to.
Verification
Against a caproni rig deployed from ea6c9379, this branch's parent:
DONE 18 tests in 6.124s exit=0
PASS e2e/bootstrap/oci.TestRepositoryIsCreatedAndUsable/e2e.oci.setup.create-repository (2.14s)
PASS e2e/bootstrap/oci.TestRepositoryDeleteHonorsDestructiveIntent/e2e.oci.setup.delete-repository (5.47s)Every pre-existing bootstrap test still passes, so the new surface costs the profile nothing but its own binary.
The rig run earned its keep: it caught envelopeMessage decoding a top-level
message when the envelope nests it under error, so the 409 message
assertion read an empty string against a well-formed body.
Also run: e2e-catalog check (0 disagreements, covered 3 to 5),
e2e-catalog generate (no id change, the rows' Status alone moved),
go build -tags=e2e ./e2e/..., go test ./e2e/...,
golangci-lint run --build-tags=e2e --max-same-issues=0 --max-issues-per-linter=0 --uniq-by-line=false ./e2e/...
(0 issues), and scripts/ci/check-comment-caps.sh.
Notes for the reviewer
- 371 insertions, of which 289 are the two new files. Under the reviewable-LOC line, so no split justification.
- Stacked on !2052, which owns the catalogs and the pattern registry this
builds on. Target it, not
main. pre-commitis not installed in the checkout this was authored in, so the hook chain was run by hand rather than on commit. It reports one failure,TestWireEncryption_NilInfraConfigResolvesLabKitDefaultincmd/artifact-registry, which reproduces atea6c9379with this commit absent and touches nothing this branch changes.