From 553379cc73b6481392a5b2236c2898e348f6f3c4 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Sun, 21 Apr 2024 15:20:43 -0400 Subject: [PATCH] test/suites/basic: use output comparison instead of grep Signed-off-by: Simon Deziel --- microcloud/test/suites/basic.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/microcloud/test/suites/basic.sh b/microcloud/test/suites/basic.sh index cd46ee954..e3f960bbb 100644 --- a/microcloud/test/suites/basic.sh +++ b/microcloud/test/suites/basic.sh @@ -720,7 +720,7 @@ test_auto() { lxc exec ${m} -- lxc list > /dev/null 2>&1 || true # Ensure we created no storage devices. - lxc exec ${m} -- lxc storage ls -f csv | wc -l | grep -qxF 0 + [ "$(lxc exec ${m} -- lxc storage ls -f csv | wc -l)" = "0" ] done reset_systems 2 0 1 @@ -737,7 +737,7 @@ test_auto() { ! lxc exec ${m} -- lxc network ls -f csv | grep -q "^UPLINK," || false # Ensure we created no storage devices. - lxc exec ${m} -- lxc storage ls -f csv | wc -l | grep -qxF 0 + [ "$(lxc exec ${m} -- lxc storage ls -f csv | wc -l)" = "0" ] done @@ -771,7 +771,7 @@ test_auto() { lxc exec ${m} -- lxc list > /dev/null 2>&1 || true # Ensure we created no storage devices. - lxc exec ${m} -- lxc storage ls -f csv | wc -l | grep -qxF 0 + [ "$(lxc exec ${m} -- lxc storage ls -f csv | wc -l)" = "0" ] done reset_systems 3 0 1 @@ -788,7 +788,7 @@ test_auto() { ! lxc exec ${m} -- lxc network ls -f csv | grep -q "^UPLINK," || false # Ensure we created no storage devices. - lxc exec ${m} -- lxc storage ls -f csv | wc -l | grep -qxF 0 + [ "$(lxc exec ${m} -- lxc storage ls -f csv | wc -l)" = "0" ] done reset_systems 3 1 1