From c49b733fef5c05fb0deef2be18a40d646f6b24a7 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Wed, 30 Sep 2015 11:54:31 +0200 Subject: [PATCH] Fix tests/test_functions.bash I am not sure why we didn't hit it before, but 1. The command is 'docker images', not 'docker image' 2. Calling 'docker rmi' requires a check on image presence Change-Id: I127359043f975a25bb1bfad7469dfe01be67e2d9 --- tests/test_functions.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_functions.bash b/tests/test_functions.bash index 921faf34..f12d3ef0 100644 --- a/tests/test_functions.bash +++ b/tests/test_functions.bash @@ -31,7 +31,7 @@ function build_test_image() { echo "Found image $img_path." fi else - if ! docker image | grep $base_dest/image ; then + if ! docker images | grep $base_dest/image ; then echo "Error: No docker image with name $base_dest/image found!" exit 1 else @@ -42,7 +42,9 @@ function build_test_image() { trap EXIT rm -rf $dest_dir - docker rmi $base_dest/image + if docker images | grep $base_dest/image ; then + docker rmi $base_dest/image + fi } function run_disk_element_test() {