From 84ae385f332291c8410aaf7a51f89dd45d071a0b Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 7 Jul 2023 16:27:04 +0200 Subject: [PATCH] test/system: Silence SC2154 Otherwise https://www.shellcheck.net/ would complain: Line 202: run echo "$name" ^---^ SC2154 (warning): name is referenced but not assigned. See: https://www.shellcheck.net/wiki/SC2154 Note that there's no need to use Bats' 'run' helper to merely check if the command succeeded or not, because 'set -e' is set for all tests [1]. [1] https://bats-core.readthedocs.io/en/stable/writing-tests.html https://github.com/containers/toolbox/pull/1334 --- test/system/104-run.bats | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/system/104-run.bats b/test/system/104-run.bats index 378ee24..1177896 100644 --- a/test/system/104-run.bats +++ b/test/system/104-run.bats @@ -199,10 +199,7 @@ teardown() { } @test "run: Ensure that the default container is used" { - run echo "$name" - - assert_success - assert_output "" + test -z "${name+x}" local default_container_name="$(get_system_id)-toolbox-$(get_system_version)" create_default_container