Improve sonobuoy status output handling

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
Brad Davidson 2021-01-22 04:23:52 -08:00 committed by Brad Davidson
parent 97a606bac1
commit fd991cb964

View File

@ -171,12 +171,12 @@ export -f dump-logs
# ---
retrieve-sonobuoy-logs() {
sonobuoy status || true
local status=passed
local code=0
local testStatus=$(sonobuoy status 2>&1)
cat <<< $testStatus
if ! sonobuoy status | grep -q -E ' +e2e +complete +passed +'; then
if ! grep -q -E '\s+e2e\s+complete\s+passed\s+' <<< $testStatus; then
status=failed
code=1
fi