mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
ci: resource tuning for faster runs (#1967)
Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
@@ -32,6 +32,8 @@ function setup_file() {
|
||||
# Setup zot server
|
||||
local zot_root_dir=${BATS_FILE_TMPDIR}/zot
|
||||
local zot_sync_ondemand_config_file=${BATS_FILE_TMPDIR}/zot_sync_ondemand_config.json
|
||||
zot_port=$(get_free_port)
|
||||
echo ${zot_port} > ${BATS_FILE_TMPDIR}/zot.port
|
||||
|
||||
mkdir -p ${zot_root_dir}
|
||||
|
||||
@@ -43,7 +45,7 @@ function setup_file() {
|
||||
},
|
||||
"http": {
|
||||
"address": "0.0.0.0",
|
||||
"port": "8090"
|
||||
"port": "${zot_port}"
|
||||
},
|
||||
"log": {
|
||||
"level": "debug",
|
||||
@@ -164,7 +166,7 @@ function setup_file() {
|
||||
EOF
|
||||
|
||||
zot_serve ${ZOT_PATH} ${zot_sync_ondemand_config_file}
|
||||
wait_zot_reachable 8090
|
||||
wait_zot_reachable ${zot_port}
|
||||
}
|
||||
|
||||
function teardown_file() {
|
||||
@@ -173,21 +175,22 @@ function teardown_file() {
|
||||
|
||||
# sync image
|
||||
@test "sync docker image list on demand" {
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run skopeo --insecure-policy copy --multi-arch=all --src-tls-verify=false \
|
||||
docker://127.0.0.1:8090/registry \
|
||||
docker://127.0.0.1:${zot_port}/registry \
|
||||
oci:${TEST_DATA_DIR}
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.repositories[]') = '"registry"' ]
|
||||
run curl http://127.0.0.1:8090/v2/registry/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/registry/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"latest"' ]
|
||||
|
||||
# make sure image is skipped when synced again
|
||||
run skopeo --insecure-policy copy --multi-arch=all --src-tls-verify=false \
|
||||
docker://127.0.0.1:8090/registry \
|
||||
docker://127.0.0.1:${zot_port}/registry \
|
||||
oci:${TEST_DATA_DIR}
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
@@ -196,21 +199,22 @@ function teardown_file() {
|
||||
}
|
||||
|
||||
@test "sync docker image on demand" {
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run skopeo --insecure-policy copy --src-tls-verify=false \
|
||||
docker://127.0.0.1:8090/archlinux \
|
||||
docker://127.0.0.1:${zot_port}/archlinux \
|
||||
oci:${TEST_DATA_DIR}
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.repositories[0]') = '"archlinux"' ]
|
||||
run curl http://127.0.0.1:8090/v2/archlinux/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/archlinux/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"latest"' ]
|
||||
|
||||
# make sure image is skipped when synced again
|
||||
run skopeo --insecure-policy copy --src-tls-verify=false \
|
||||
docker://127.0.0.1:8090/archlinux \
|
||||
docker://127.0.0.1:${zot_port}/archlinux \
|
||||
oci:${TEST_DATA_DIR}
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
@@ -219,129 +223,139 @@ function teardown_file() {
|
||||
}
|
||||
|
||||
@test "sync k8s image list on demand" {
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run skopeo --insecure-policy copy --multi-arch=all --src-tls-verify=false \
|
||||
docker://127.0.0.1:8090/kube-apiserver:v1.26.0 \
|
||||
docker://127.0.0.1:${zot_port}/kube-apiserver:v1.26.0 \
|
||||
oci:${TEST_DATA_DIR}
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.repositories[1]') = '"kube-apiserver"' ]
|
||||
run curl http://127.0.0.1:8090/v2/kube-apiserver/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/kube-apiserver/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"v1.26.0"' ]
|
||||
}
|
||||
|
||||
@test "sync k8s image on demand" {
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run skopeo --insecure-policy copy --src-tls-verify=false \
|
||||
docker://127.0.0.1:8090/pause \
|
||||
docker://127.0.0.1:${zot_port}/pause \
|
||||
oci:${TEST_DATA_DIR}
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.repositories[2]') = '"pause"' ]
|
||||
run curl http://127.0.0.1:8090/v2/pause/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/pause/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"latest"' ]
|
||||
}
|
||||
|
||||
@test "sync image on demand from registry.k8s.io" {
|
||||
run skopeo copy docker://127.0.0.1:8090/kube-apiserver-amd64:v1.10.0 oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run skopeo copy docker://127.0.0.1:${zot_port}/kube-apiserver-amd64:v1.10.0 oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "kube-apiserver-amd64"))' | jq '.[]') = '"kube-apiserver-amd64"' ]
|
||||
run curl http://127.0.0.1:8090/v2/kube-apiserver-amd64/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/kube-apiserver-amd64/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"v1.10.0"' ]
|
||||
}
|
||||
|
||||
@test "sync image on demand from aws.amazon.com/ecr" {
|
||||
run skopeo copy docker://127.0.0.1:8090/amazonlinux/amazonlinux:latest oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run skopeo copy docker://127.0.0.1:${zot_port}/amazonlinux/amazonlinux:latest oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "amazonlinux/amazonlinux"))' | jq '.[]') = '"amazonlinux/amazonlinux"' ]
|
||||
run curl http://127.0.0.1:8090/v2/amazonlinux/amazonlinux/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/amazonlinux/amazonlinux/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"latest"' ]
|
||||
}
|
||||
|
||||
@test "sync image on demand from gcr.io" {
|
||||
run skopeo copy docker://127.0.0.1:8090/google-containers/kube-proxy-amd64:v1.17.9 oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run skopeo copy docker://127.0.0.1:${zot_port}/google-containers/kube-proxy-amd64:v1.17.9 oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "google-containers/kube-proxy-amd64"))' | jq '.[]') = '"google-containers/kube-proxy-amd64"' ]
|
||||
run curl http://127.0.0.1:8090/v2/google-containers/kube-proxy-amd64/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/google-containers/kube-proxy-amd64/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"v1.17.9"' ]
|
||||
}
|
||||
|
||||
@test "sync image on demand from mcr.microsoft.com" {
|
||||
run skopeo copy docker://127.0.0.1:8090/azure-cognitive-services/vision/spatial-analysis/diagnostics:latest oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run skopeo copy docker://127.0.0.1:${zot_port}/azure-cognitive-services/vision/spatial-analysis/diagnostics:latest oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "azure-cognitive-services/vision/spatial-analysis/diagnostics"))' | jq '.[]') = '"azure-cognitive-services/vision/spatial-analysis/diagnostics"' ]
|
||||
run curl http://127.0.0.1:8090/v2/azure-cognitive-services/vision/spatial-analysis/diagnostics/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/azure-cognitive-services/vision/spatial-analysis/diagnostics/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"latest"' ]
|
||||
}
|
||||
|
||||
@test "sync image on demand from registry.gitlab.com" {
|
||||
run skopeo copy docker://127.0.0.1:8090/gitlab-org/public-image-archive/gitlab-ee:15.11.6-ee.0 oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run skopeo copy docker://127.0.0.1:${zot_port}/gitlab-org/public-image-archive/gitlab-ee:15.11.6-ee.0 oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "gitlab-org/public-image-archive/gitlab-ee"))' | jq '.[]') = '"gitlab-org/public-image-archive/gitlab-ee"' ]
|
||||
run curl http://127.0.0.1:8090/v2/gitlab-org/public-image-archive/gitlab-ee/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/gitlab-org/public-image-archive/gitlab-ee/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"15.11.6-ee.0"' ]
|
||||
}
|
||||
|
||||
@test "sync image on demand from quay.io" {
|
||||
run skopeo copy docker://127.0.0.1:8090/coreos/etcd:v3.4.26 oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run skopeo copy docker://127.0.0.1:${zot_port}/coreos/etcd:v3.4.26 oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "coreos/etcd"))' | jq '.[]') = '"coreos/etcd"' ]
|
||||
run curl http://127.0.0.1:8090/v2/coreos/etcd/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/coreos/etcd/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"v3.4.26"' ]
|
||||
}
|
||||
|
||||
@test "sync image on demand from ghcr.io" {
|
||||
run skopeo copy docker://127.0.0.1:8090/project-zot/zot-linux-amd64:v2.0.0-rc5 oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run skopeo copy docker://127.0.0.1:${zot_port}/project-zot/zot-linux-amd64:v2.0.0-rc5 oci:${TEST_DATA_DIR} --src-tls-verify=false
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "project-zot/zot-linux-amd64"))' | jq '.[]') = '"project-zot/zot-linux-amd64"' ]
|
||||
run curl http://127.0.0.1:8090/v2/project-zot/zot-linux-amd64/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/project-zot/zot-linux-amd64/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"v2.0.0-rc5"' ]
|
||||
}
|
||||
|
||||
@test "run docker with image synced from docker.io" {
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
local zot_root_dir=${BATS_FILE_TMPDIR}/zot
|
||||
run rm -rf ${zot_root_dir}
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run docker run -d 127.0.0.1:8090/archlinux:latest
|
||||
run docker run -d 127.0.0.1:${zot_port}/archlinux:latest
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "archlinux"))' | jq '.[]') = '"archlinux"' ]
|
||||
run curl http://127.0.0.1:8090/v2/archlinux/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/archlinux/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"latest"' ]
|
||||
|
||||
@@ -349,13 +363,14 @@ function teardown_file() {
|
||||
}
|
||||
|
||||
@test "run docker with image synced from registry.k8s.io" {
|
||||
run docker run -d 127.0.0.1:8090/kube-apiserver-amd64:v1.10.0
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run docker run -d 127.0.0.1:${zot_port}/kube-apiserver-amd64:v1.10.0
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "kube-apiserver-amd64"))' | jq '.[]') = '"kube-apiserver-amd64"' ]
|
||||
run curl http://127.0.0.1:8090/v2/kube-apiserver-amd64/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/kube-apiserver-amd64/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"v1.10.0"' ]
|
||||
|
||||
@@ -363,13 +378,14 @@ function teardown_file() {
|
||||
}
|
||||
|
||||
@test "run docker with image synced from aws.amazon.com/ecr" {
|
||||
run docker run -d 127.0.0.1:8090/amazonlinux/amazonlinux:latest
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run docker run -d 127.0.0.1:${zot_port}/amazonlinux/amazonlinux:latest
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "amazonlinux/amazonlinux"))' | jq '.[]') = '"amazonlinux/amazonlinux"' ]
|
||||
run curl http://127.0.0.1:8090/v2/amazonlinux/amazonlinux/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/amazonlinux/amazonlinux/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"latest"' ]
|
||||
|
||||
@@ -377,13 +393,14 @@ function teardown_file() {
|
||||
}
|
||||
|
||||
@test "run docker with image synced from gcr.io" {
|
||||
run docker run -d 127.0.0.1:8090/google-containers/kube-proxy-amd64:v1.17.9
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run docker run -d 127.0.0.1:${zot_port}/google-containers/kube-proxy-amd64:v1.17.9
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "google-containers/kube-proxy-amd64"))' | jq '.[]') = '"google-containers/kube-proxy-amd64"' ]
|
||||
run curl http://127.0.0.1:8090/v2/google-containers/kube-proxy-amd64/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/google-containers/kube-proxy-amd64/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"v1.17.9"' ]
|
||||
|
||||
@@ -391,13 +408,14 @@ function teardown_file() {
|
||||
}
|
||||
|
||||
@test "run docker with image synced from mcr.microsoft.com" {
|
||||
run docker run -d 127.0.0.1:8090/azure-cognitive-services/vision/spatial-analysis/diagnostics:latest
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run docker run -d 127.0.0.1:${zot_port}/azure-cognitive-services/vision/spatial-analysis/diagnostics:latest
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "azure-cognitive-services/vision/spatial-analysis/diagnostics"))' | jq '.[]') = '"azure-cognitive-services/vision/spatial-analysis/diagnostics"' ]
|
||||
run curl http://127.0.0.1:8090/v2/azure-cognitive-services/vision/spatial-analysis/diagnostics/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/azure-cognitive-services/vision/spatial-analysis/diagnostics/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"latest"' ]
|
||||
|
||||
@@ -405,37 +423,40 @@ function teardown_file() {
|
||||
}
|
||||
|
||||
@test "run docker with image synced from registry.gitlab.com" {
|
||||
run docker run -d 127.0.0.1:8090/gitlab-org/public-image-archive/gitlab-ee:15.11.6-ee.0
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run docker run -d 127.0.0.1:${zot_port}/gitlab-org/public-image-archive/gitlab-ee:15.11.6-ee.0
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "gitlab-org/public-image-archive/gitlab-ee"))' | jq '.[]') = '"gitlab-org/public-image-archive/gitlab-ee"' ]
|
||||
run curl http://127.0.0.1:8090/v2/gitlab-org/public-image-archive/gitlab-ee/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/gitlab-org/public-image-archive/gitlab-ee/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"15.11.6-ee.0"' ]
|
||||
}
|
||||
|
||||
@test "run docker with image synced from quay.io" {
|
||||
run docker run -d 127.0.0.1:8090/coreos/etcd:v3.4.26
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run docker run -d 127.0.0.1:${zot_port}/coreos/etcd:v3.4.26
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "coreos/etcd"))' | jq '.[]') = '"coreos/etcd"' ]
|
||||
run curl http://127.0.0.1:8090/v2/coreos/etcd/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/coreos/etcd/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"v3.4.26"' ]
|
||||
}
|
||||
|
||||
@test "run docker with image synced from ghcr.io" {
|
||||
run docker run -d 127.0.0.1:8090/project-zot/zot-linux-amd64:v2.0.0-rc5
|
||||
zot_port=`cat ${BATS_FILE_TMPDIR}/zot.port`
|
||||
run docker run -d 127.0.0.1:${zot_port}/project-zot/zot-linux-amd64:v2.0.0-rc5
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run curl http://127.0.0.1:8090/v2/_catalog
|
||||
run curl http://127.0.0.1:${zot_port}/v2/_catalog
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}"| jq '.repositories | map(select(. == "project-zot/zot-linux-amd64"))' | jq '.[]') = '"project-zot/zot-linux-amd64"' ]
|
||||
run curl http://127.0.0.1:8090/v2/project-zot/zot-linux-amd64/tags/list
|
||||
run curl http://127.0.0.1:${zot_port}/v2/project-zot/zot-linux-amd64/tags/list
|
||||
[ "$status" -eq 0 ]
|
||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"v2.0.0-rc5"' ]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user