From e6539290d491dc187a2bda8668ad7810c06ef351 Mon Sep 17 00:00:00 2001 From: peusebiu Date: Wed, 2 Nov 2022 22:05:18 +0200 Subject: [PATCH] test(bats): added regclient OCI artifact commands (#938) Signed-off-by: Petu Eusebiu --- README.md | 1 + test/blackbox/pushpull.bats | 50 +++++++++++++++++++++++++++++++------ 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 20d4a2c9..d94a7da2 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ The following document refers on the **core dist-spec**, see also the [zot-speci * Multi-arch support * Clustering support * Image linting support +* Supports push/pull OCI Artifacts ## [Demos](demos/README.md) diff --git a/test/blackbox/pushpull.bats b/test/blackbox/pushpull.bats index 0374ea54..469986b6 100644 --- a/test/blackbox/pushpull.bats +++ b/test/blackbox/pushpull.bats @@ -133,14 +133,19 @@ function teardown_file() { [ "$status" -eq 0 ] } -@test "copy image with regclient" { +@test "push image with regclient" { run regctl registry set localhost:8080 --tls disabled [ "$status" -eq 0 ] run regctl image copy ocidir://${TEST_DATA_DIR}/golang:1.19 localhost:8080/test-regclient [ "$status" -eq 0 ] } -@test "list all images with regclient" { +@test "pull image with regclient" { + run regctl image copy localhost:8080/test-regclient ocidir://${TEST_DATA_DIR}/golang:1.19 + [ "$status" -eq 0 ] +} + +@test "list repositories with regclient" { run regctl repo ls localhost:8080 [ "$status" -eq 0 ] @@ -155,7 +160,7 @@ function teardown_file() { [ "$found" -eq 1 ] } -@test "list tags with regclient" { +@test "list image tags with regclient" { run regctl tag ls localhost:8080/test-regclient [ "$status" -eq 0 ] @@ -170,7 +175,7 @@ function teardown_file() { [ "$found" -eq 1 ] } -@test "get and push manifest with regclient" { +@test "push manifest with regclient" { manifest=$(regctl manifest get localhost:8080/test-regclient --format=raw-body) run regctl manifest put localhost:8080/test-regclient:1.0.0 --format oci --content-type application/vnd.oci.image.manifest.v1+json --format oci <