From 92482b282edfb7cc7935f5d2323ee0dc15bd0f84 Mon Sep 17 00:00:00 2001 From: Zack Brady Date: Mon, 10 Aug 2026 23:29:50 -0400 Subject: [PATCH] added experimental and fixed int tests --- .github/workflows/tests.yaml | 16 ++++++---------- cmd/hauler/cli/copy.go | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a1a2148..009c8c1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -222,9 +222,7 @@ jobs: hauler store copy registry://localhost:5002 --plain-http # verify blobs actually landed in the registry backend [ $(find registry -type f | wc -l) -gt 0 ] - # verify --only is accepted (a registry seeded fresh at startup from the - # whole store can't prove exclusion here -- registry-side filtering is - # covered by --only's own unit tests) + # verify via --only hauler store copy registry://localhost:5002 --plain-http --only busybox pkill -f "hauler store serve registry --port 5002" rm -rf registry @@ -236,19 +234,17 @@ jobs: - name: Verify - hauler copy run: | hauler copy --help - # source registry (seeded from the store, which already has busybox) + # start source registry hauler store serve registry --port 5004 --readonly=false --directory registry-src & until curl -sf http://localhost:5004/v2/_catalog; do : ; done - # destination registry + # start destination registry hauler store serve registry --port 5005 --readonly=false --directory registry-dst & until curl -sf http://localhost:5005/v2/_catalog; do : ; done - # verify a direct registry-to-registry copy, bypassing the store - # (destination path is deliberately distinct from anything the destination - # registry auto-seeded at startup, so its presence proves the copy, not the seed) - hauler copy localhost:5004/hauler-dev/library/busybox:latest localhost:5005/mycopy/busybox:latest --plain-http + # verify a direct registry to registry copy + hauler copy localhost:5004/custom-path/busybox:stable localhost:5005/mycopy/busybox:latest --plain-http test -d registry-dst/docker/registry/v2/repositories/mycopy/busybox # verify --platform copies a single platform out of the index - hauler copy localhost:5004/hauler-dev/library/busybox:latest localhost:5005/mycopy/busybox-platform:amd64 --plain-http --platform linux/amd64 + hauler copy localhost:5004/custom-path/busybox:stable localhost:5005/mycopy/busybox-platform:amd64 --plain-http --platform linux/amd64 test -d registry-dst/docker/registry/v2/repositories/mycopy/busybox-platform pkill -f "hauler store serve registry --port 5004" pkill -f "hauler store serve registry --port 5005" diff --git a/cmd/hauler/cli/copy.go b/cmd/hauler/cli/copy.go index 85c25ca..b13548d 100644 --- a/cmd/hauler/cli/copy.go +++ b/cmd/hauler/cli/copy.go @@ -25,7 +25,7 @@ func addCopy(parent *cobra.Command, ro *flags.CliRootOpts) { cmd := &cobra.Command{ Use: "copy SRC DST", Aliases: []string{"cp"}, - Short: "Copy an artifact between registries", + Short: "(EXPERIMENTAL) Copy an artifact between registries", Example: ` # copy an image to another registry hauler copy busybox:latest registry.example.com/busybox:latest