Skip to content

joshbwlng/zot-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zot-test

Testing

To test automatic full syncing from distribution to zot, set "onDemand": false and add "pollInterval": "10s".

Generate keypair:

mkdir keys
openssl genrsa -out keys/private.pem 2048
openssl rsa -in keys/private.pem -pubout -out keys/public.pem

Start cluster:

docker compose up --build

Can check http://localhost:5002 to view Zot's UI and available images. Can also see the signed JWT token the API is issuing via it's logs. Update logic to return 401 to test auth failure.

Testing full sync

Pull an image locally and push to distribution service only. Wait a few seconds and then check the Zot UI to see the image has been copied over. For on-demand pull-through cache testing:

docker pull amd64/alpine
docker tag amd64/alpine:latest localhost:5000/alpine:latest
docker push localhost:5000/alpine:latest

Testing on-demand sync

Pull an image locally and push to distrubition service only. Then attempt to pull the same image but via the Zot instance:

docker pull amd64/alpine
docker tag amd64/alpine:latest localhost:5000/alpine:latest
docker push localhost:5000/alpine:latest
docker pull localhost:5002/alpine:latest

Now confirm that you can push to the Zot instance even though it's configured to also function as a pullthrough cache:

docker pull amd64/alpine:3.20
docker tag amd64/alpine:3.20 localhost:5002/alpine:3.20
docker push localhost:5002/alpine:3.20

Testing garbage collection

Push an image, delete it's manifest via the API, and then check minio to ensure the blobs were eventually removed:

docker push localhost:5002/alpine:latest                                                                             130 ↵
The push refers to repository [localhost:5002/alpine]
014e56e61396: Pushed 
fd1c12efde93: Pushed 
8c2d3640fffc: Pushed 
latest: digest: sha256:b47afff56f9040673f4878cb4215666e2317403525985f2cd95b51531d4846c8 size: 1496

curl -X DELETE http://localhost:5002/v2/alpine/manifests/sha256:b47afff56f9040673f4878cb4215666e2317403525985f2cd95b51531d4846c8

Push multiple tags for an image, delete both manifests via the API, and then check minio to ensure the blobs were eventually remove:

docker push localhost:5002/alpine:latest                                                                             130 ↵
The push refers to repository [localhost:5002/alpine]
014e56e61396: Pushed 
fd1c12efde93: Pushed 
8c2d3640fffc: Pushed 
latest: digest: sha256:b47afff56f9040673f4878cb4215666e2317403525985f2cd95b51531d4846c8 size: 1496

docker push localhost:5002/alpine:3.20  
The push refers to repository [localhost:5002/alpine]
5311e7f182d0: Pushed 
70671e0b57b3: Pushed 
891808b14b12: Pushed 
3.20: digest: sha256:dad1f1b85525e7cd73c4698b8a0900ec5dadc7b23fa546f402bec9ac4d63b85c size: 1496

curl -X DELETE http://localhost:5002/v2/alpine/manifests/sha256:dad1f1b85525e7cd73c4698b8a0900ec5dadc7b23fa546f402bec9ac4d63b85c

curl -X DELETE http://localhost:5002/v2/alpine/manifests/sha256:b47afff56f9040673f4878cb4215666e2317403525985f2cd95b51531d4846c8

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors