Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oxpa committed Sep 6, 2024
1 parent c8c6e7b commit 7328d82
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ jobs:
- 5000:5000
env:
REGISTRY_STORAGE: "s3"
REGISTRY_STORAGE_S3_REGIONENDPOINT: "http://s3mock:9090"
REGISTRY_STORAGE_S3_BUCKET: "mockbucket"
REGISTRY_STORAGE_S3_V4AUTH: "false"
REGISTRY_STORAGE_S3_REGION: "generic"
REGISTRY_STORAGE_S3_REGIONENDPOINT: "http://s3mock:9090"
REGISTRY_STORAGE_S3_SECURE: "false"
REGISTRY_STORAGE_S3_ACCESSKEY: "123"
REGISTRY_STORAGE_S3_SECRETKEY: "123"
REGISTRY_STORAGE_DELETE_ENABLED: "true"
REGISTRY_STORAGE_REDIRECT_DISABLE: "true"
credentials:
username: oxpa
Expand Down Expand Up @@ -153,6 +154,10 @@ jobs:
- name: Prune registry
run: |
EXPERIMENTAL=true ./docker-distribution-pruner -config examples/registry/s3config.yml -delete -trace
if EXPERIMENTAL=true ./docker-distribution-pruner -config examples/registry/s3config.yml -delete -trace 2>&1 | grep 'DELETE '; then
exit 1
fi
- name: Test images can be downloaded after pruning
run: |
Expand All @@ -161,3 +166,31 @@ 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
if EXPERIMENTAL=true ./docker-distribution-pruner -config examples/registry/s3config.yml -delete -trace 2>&1 | grep 'DELETE '; then
exit 1
fi
- 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

0 comments on commit 7328d82

Please sign in to comment.