From 1e7d880b561318aa2ad89d7583addad1904e5a36 Mon Sep 17 00:00:00 2001 From: umohnani8 Date: Tue, 12 Dec 2017 13:33:10 -0500 Subject: Add manifest type conversion to kpod push User can select from 3 manifest types: oci, v2s1, or v2s2 e.g kpod push --format v2s2 alpine dir:my-directory Added "compress" flag to enable compression when true Signed-off-by: umohnani8 Closes: #126 Approved by: rhatdan --- test/kpod_push.bats | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') diff --git a/test/kpod_push.bats b/test/kpod_push.bats index d9b1811cc..dee29a64c 100644 --- a/test/kpod_push.bats +++ b/test/kpod_push.bats @@ -84,3 +84,19 @@ function setup() { run ${KPOD_BINARY} $KPOD_OPTIONS rmi "$ALPINE" echo "$output" } + +@test "push with manifest type conversion" { + run bash -c "${KPOD_BINARY} $KPOD_OPTIONS push --format oci "${BB}" dir:my-dir" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "grep "application/vnd.oci.image.config.v1+json" my-dir/manifest.json" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${KPOD_BINARY} $KPOD_OPTIONS push --compress --format v2s2 "${BB}" dir:my-dir" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "grep "application/vnd.docker.distribution.manifest.v2+json" my-dir/manifest.json" + echo "$output" + [ "$status" -eq 0 ] + rm -rf my-dir +} -- cgit v1.2.3-54-g00ecf