From 3874be5eeb9030b159153ea43ea9aa6589aac45a Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Sun, 21 Apr 2024 15:19:31 -0400 Subject: [PATCH] test/suites/add: use output comparison instead of grep Signed-off-by: Simon Deziel --- microcloud/test/suites/add.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microcloud/test/suites/add.sh b/microcloud/test/suites/add.sh index dccc4f4b9..2df58c5c6 100644 --- a/microcloud/test/suites/add.sh +++ b/microcloud/test/suites/add.sh @@ -34,7 +34,7 @@ test_add_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 # Test with all systems. @@ -67,7 +67,7 @@ test_add_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 # Test with ZFS and Ceph disks.