From 71ce8ba0ed3ae4b1118c2715e8b03f563b98f7cf Mon Sep 17 00:00:00 2001 From: oxpa Date: Thu, 5 Sep 2024 15:07:03 +0100 Subject: [PATCH] More tests --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index db18831..772abeb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -161,3 +161,28 @@ jobs: regctl --host reg=localhost:5000,tls=disabled image manifest localhost:5000/image:$i regctl --host reg=localhost:5000,tls=disabled image export localhost:5000/image:$i > /dev/null done + - name: Delete tag + run: | + regctl --host reg=localhost:5000,tls=disabled tag list localhost:5000/image + regctl --host reg=localhost:5000,tls=disabled tag delete localhost:5000/image:latest + for i in A AB; do + regctl --host reg=localhost:5000,tls=disabled image manifest localhost:5000/image:$i + regctl --host reg=localhost:5000,tls=disabled image export localhost:5000/image:$i > /dev/null + done + if regctl --host reg=localhost:5000,tls=disabled image manifest localhost:5000/image:latest; then + echo "Something went wrong!" + exit 1 + fi + + - name: Prune registry again + run: | + EXPERIMENTAL=true ./docker-distribution-pruner -config examples/registry/s3config.yml -delete -trace + + + - name: Test images can be downloaded after pruning a tag + run: | + regctl --host reg=localhost:5000,tls=disabled tag list localhost:5000/image + for i in A AB; do + regctl --host reg=localhost:5000,tls=disabled image manifest localhost:5000/image:$i + regctl --host reg=localhost:5000,tls=disabled image export localhost:5000/image:$i > /dev/null + done