From 9216c1e1e8ed9cf803ba4228c06f428bc40b001e Mon Sep 17 00:00:00 2001 From: Micah Nagel <micah.nagel@parsons.com> Date: Mon, 19 Apr 2021 10:18:55 -0600 Subject: [PATCH] bug fix: add a check to pass ib test if grep finds no lines --- tests/bash/02_non_ironbank.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bash/02_non_ironbank.sh b/tests/bash/02_non_ironbank.sh index 944903c523..981fc8f28c 100755 --- a/tests/bash/02_non_ironbank.sh +++ b/tests/bash/02_non_ironbank.sh @@ -6,4 +6,4 @@ set -e # Quick check for non iron bank images echo "Showing images not from ironbank:" # Ignore rancher images since those are from k3d -kubectl get pods -A -o jsonpath="{..image}" | tr -s '[[:space:]]' '\n' | sort | uniq -c | grep -v "registry1" | grep -v "rancher" +kubectl get pods -A -o jsonpath="{..image}" | tr -s '[[:space:]]' '\n' | sort | uniq -c | grep -v "registry1" | grep -v "rancher" || [[ $? == 1 ]] -- GitLab