From 965c4913984bf5338732eb1f089c716dee8317e4 Mon Sep 17 00:00:00 2001 From: Jack Shaw Date: Tue, 26 Mar 2024 13:24:22 +0000 Subject: [PATCH] Filter output from show-controller to show important info This is a quality of life improvement. Significantly reduce console spam --- tests/suites/controller/enable_ha.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/suites/controller/enable_ha.sh b/tests/suites/controller/enable_ha.sh index 61ef8fd1628..c2da925ddf7 100644 --- a/tests/suites/controller/enable_ha.sh +++ b/tests/suites/controller/enable_ha.sh @@ -32,7 +32,7 @@ wait_for_ha() { # shellcheck disable=SC2143 until [[ "$(juju show-controller --format=json | jq -r '.[] | .["controller-machines"] | .[] | select(.["ha-status"] == "ha-enabled") | .["instance-id"]' | wc -l | grep "${amount}")" ]]; do echo "[+] (attempt ${attempt}) polling ha" - juju show-controller 2>&1 | sed 's/^/ | /g' + juju show-controller 2>&1 | yq '.[]["controller-machines"]' | sed 's/^/ | /g' sleep "${SHORT_TIMEOUT}" attempt=$((attempt + 1))