Skip to content

test(docker): the delete tests ask a fixture upstream, not Docker Hub - #1179

Merged
ertime037 merged 1 commit into
mainfrom
test/docker-delete-hermetic
Oct 26, 2026
Merged

ertime037 merged 1 commit into
mainfrom
test/docker-delete-hermetic

Conversation

@devitway

@devitway devitway commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Before

a_deleted_manifest_is_gone_on_local_and_object_storage and a_delete_removes_both_copies_of_a_manifest use the binary's default Docker upstream, so that a pushed name gets the upstream's namespace and a delete has two keys. After the delete, the GET for the manifest was a miss asked of Docker Hub. Docker Hub answers 401 for a name it does not hold, which NORA turns into 404; when it answered 5xx or not at all, the miss was 502 and the tests failed although the manifest was gone. That happened in the coverage job of the merge group for #1178.

After

The default upstream keeps its namespace and points at a local fixture that answers 404 to every request. The layout under test is unchanged; no request leaves the machine.

How it was checked

  • Before: with the outbound proxy pointed at a closed port, both tests failed with 502 instead of 404; with network they passed in 13.9 s.
  • After: both pass with the outbound proxy closed and with network, in about 1 s.
  • Control: with the fixture answering 503, both fail with 502 — the miss does reach the fixture.
  • cargo fmt --check, cargo clippy --all-targets -D warnings, the registry::docker tests.

Both delete tests set the binary's default upstream to give a pushed name
its namespace, and so asked Docker Hub for the deleted manifest. Docker
Hub answers 401 for a name it does not hold, which is a 404 here; when it
answered 5xx or not at all, the miss was a 502 and the test failed,
though the manifest was gone.

The default upstream keeps its namespace and points at a local fixture
that answers 404 to everything. With no network the tests pass, in about
a second instead of fourteen; with the fixture answering 503 both see
502, so the miss does reach it.
@devitway
devitway requested a review from ertime037 as a code owner October 26, 2026 19:53
@ertime037
ertime037 enabled auto-merge October 26, 2026 19:55
@ertime037
ertime037 added this pull request to the merge queue Oct 26, 2026
@github-actions

Copy link
Copy Markdown

🐳 Test image pushed: ghcr.io/getnora-io/nora:pr-1179

docker pull ghcr.io/getnora-io/nora:pr-1179
docker run --rm -p 4000:4000 ghcr.io/getnora-io/nora:pr-1179

Merged via the queue into main with commit be033b1 Oct 26, 2026
20 checks passed
@ertime037
ertime037 deleted the test/docker-delete-hermetic branch October 26, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants