Isolate network-faults test into its own package

What does this MR do?

Follow-up to the review on !6996 (merged) (see !6996 (comment 3648882992) and the review notes above it). Moves the network-faults pull-retry test into its own package so the CI job can be scoped to just that one test, and fixes a cold-daemon failure the isolation exposed.

Why was this MR needed?

Two problems remained after !6996 (merged) merged, both detailed in #39677 (closed):

  1. The integration test (docker, network-faults) job still discovers ~111 tests instead of 1, because dropping the integration build tag from ./executors/docker pulls in that package's ~108 plain unit tests instead of its ~76 integration tests.
  2. startAndSeedRegistry tags the test image onto a local registry without pulling it first, which worked by accident only while this test shared a package with other tests that happened to pull the same image first.

What's the best way to test this MR?

  • go test -tags integration,network_faults -list '.*' ./executors/docker/networkfaults lists exactly TestDockerCommandPullRetriesTransientRegistryFailure.
  • go test -tags integration -list '.*' ./executors/docker no longer lists that test.
  • go vet, make lint, and go test ./executors/docker/... (unit tests) all pass.
  • The pull-retry test itself needs a real docker daemon; verified locally against a cold daemon (image removed first) until network access to Docker Hub inside this sandbox became the limiting factor pulling registry:2 -- CI's integration test (docker, network-faults) job run on this MR is the authoritative check.

What are the relevant issue numbers?

Closes #39677 (closed)

Merge request reports

Loading
Loading