From 933f1b6da9ea17598dfd04a0bc2ab18814889a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Mon, 23 Jan 2017 16:16:02 +0100 Subject: [PATCH] output formating MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- tests/4_container_images.sh | 12 +++++++++--- tests/5_container_runtime.sh | 8 ++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/4_container_images.sh b/tests/4_container_images.sh index b319a5f..b41c945 100644 --- a/tests/4_container_images.sh +++ b/tests/4_container_images.sh @@ -59,7 +59,9 @@ for img in $images; do warn "$check_4_6" fi imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null) - warn " * No Healthcheck found : $imgName" + if ! [ "$imgName" = '[]' ]; then + warn " * No Healthcheck found: $imgName" + fi fi done if [ $fail -eq 0 ]; then @@ -77,7 +79,9 @@ for img in $images; do info "$check_4_7" fi imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null) - info " * Update instruction found in history of $imgName" + if ! [ "$imgName" = '[]' ]; then + info " * Update instruction found: $imgName" + fi fi done if [ $fail -eq 0 ]; then @@ -95,7 +99,9 @@ for img in $images; do info "$check_4_9" fi imgName=$(docker inspect --format='{{.RepoTags}}' "$img" 2>/dev/null) - info " * Found ADD in docker history of $imgName" + if ! [ "$imgName" = '[]' ]; then + info " * ADD in image history: $imgName" + fi fi done if [ $fail -eq 0 ]; then diff --git a/tests/5_container_runtime.sh b/tests/5_container_runtime.sh index 6ff1557..7ef6310 100644 --- a/tests/5_container_runtime.sh +++ b/tests/5_container_runtime.sh @@ -575,10 +575,10 @@ else if [ $? -ne 0 ]; then if [ $fail -eq 0 ]; then warn "$check_5_26" - warn " * Health check not set for $c" + warn " * Health check not set: $c" fail=1 else - warn " * Health check not set for $c" + warn " * Health check not set: $c" fi fi done @@ -597,10 +597,10 @@ else # If it's the first container, fail the test if [ $fail -eq 0 ]; then warn "$check_5_28" - warn " * pidslimit not set: $c" + warn " * PID limit not set: $c" fail=1 else - warn " * pidslimit not set: $c" + warn " * PID limit not set: $c" fi fi done