From 21d8c2544c6395385e8b3ed2500b068cc295fd14 Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Fri, 26 May 2017 15:45:08 +0200 Subject: [PATCH 1/2] .gitignore: do not ignore *.rej files also do some cleanup Signed-off-by: Antonio Murdaca --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index a244b597..f9c8e7d9 100644 --- a/.gitignore +++ b/.gitignore @@ -12,8 +12,6 @@ *.orig /pause/pause /pause/pause.o -*.rej /test/bin2img/bin2img /test/checkseccomp/checkseccomp /test/copyimg/copyimg -/test/testdata/redis-image From aa9abdfe40d0b7ffde969d2e7737e2790c215e5e Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Fri, 26 May 2017 15:46:08 +0200 Subject: [PATCH 2/2] test: pull just once in integration tests w/o this patch we were always pulling redis:alpine by digest in each test. Signed-off-by: Antonio Murdaca --- test/helpers.bash | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/helpers.bash b/test/helpers.bash index 46e32db7..aaa8578c 100644 --- a/test/helpers.bash +++ b/test/helpers.bash @@ -77,6 +77,19 @@ if ! [ -d "$ARTIFACTS_PATH"/redis-image ]; then fi fi +# TODO: remove the code below for redis digested image id when +# https://github.com/kubernetes-incubator/cri-o/issues/531 is complete +# as the digested reference will be auto-stored when pulling the tag +# above +if ! [ -d "$ARTIFACTS_PATH"/redis-image-digest ]; then + mkdir -p "$ARTIFACTS_PATH"/redis-image-digest + if ! "$COPYIMG_BINARY" --import-from=docker://redis@sha256:03789f402b2ecfb98184bf128d180f398f81c63364948ff1454583b02442f73b --export-to=dir:"$ARTIFACTS_PATH"/redis-image-digest --signature-policy="$INTEGRATION_ROOT"/policy.json ; then + echo "Error pulling docker://redis@sha256:03789f402b2ecfb98184bf128d180f398f81c63364948ff1454583b02442f73b" + rm -fr "$ARTIFACTS_PATH"/redis-image-digest + exit 1 + fi +fi + # Make sure we have a copy of the runcom/stderr-test image. if ! [ -d "$ARTIFACTS_PATH"/stderr-test ]; then mkdir -p "$ARTIFACTS_PATH"/stderr-test @@ -168,6 +181,11 @@ function start_crio() { "$BIN2IMG_BINARY" --root "$TESTDIR/crio" $STORAGE_OPTS --runroot "$TESTDIR/crio-run" --source-binary "$PAUSE_BINARY" fi "$COPYIMG_BINARY" --root "$TESTDIR/crio" $STORAGE_OPTS --runroot "$TESTDIR/crio-run" --image-name=redis:alpine --import-from=dir:"$ARTIFACTS_PATH"/redis-image --add-name=docker.io/library/redis:alpine --signature-policy="$INTEGRATION_ROOT"/policy.json +# TODO: remove the code below for redis:alpine digested image id when +# https://github.com/kubernetes-incubator/cri-o/issues/531 is complete +# as the digested reference will be auto-stored when pulling the tag +# above + "$COPYIMG_BINARY" --root "$TESTDIR/crio" $STORAGE_OPTS --runroot "$TESTDIR/crio-run" --image-name=redis@sha256:03789f402b2ecfb98184bf128d180f398f81c63364948ff1454583b02442f73b --import-from=dir:"$ARTIFACTS_PATH"/redis-image-digest --add-name=docker.io/library/redis@sha256:03789f402b2ecfb98184bf128d180f398f81c63364948ff1454583b02442f73b --signature-policy="$INTEGRATION_ROOT"/policy.json "$COPYIMG_BINARY" --root "$TESTDIR/crio" $STORAGE_OPTS --runroot "$TESTDIR/crio-run" --image-name=mrunalp/oom --import-from=dir:"$ARTIFACTS_PATH"/oom-image --add-name=docker.io/library/mrunalp/oom --signature-policy="$INTEGRATION_ROOT"/policy.json "$COPYIMG_BINARY" --root "$TESTDIR/crio" $STORAGE_OPTS --runroot "$TESTDIR/crio-run" --image-name=busybox:latest --import-from=dir:"$ARTIFACTS_PATH"/busybox-image --add-name=docker.io/library/busybox:latest --signature-policy="$INTEGRATION_ROOT"/policy.json "$COPYIMG_BINARY" --root "$TESTDIR/crio" $STORAGE_OPTS --runroot "$TESTDIR/crio-run" --image-name=runcom/stderr-test:latest --import-from=dir:"$ARTIFACTS_PATH"/stderr-test --add-name=docker.io/runcom/stderr-test:latest --signature-policy="$INTEGRATION_ROOT"/policy.json