diff --git a/test/system/001-version.bats b/test/system/001-version.bats index daf4e58..0bbd399 100644 --- a/test/system/001-version.bats +++ b/test/system/001-version.bats @@ -30,5 +30,7 @@ setup() { assert_success assert_output --regexp '^toolbox version [0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?$' assert [ ${#lines[@]} -eq 1 ] + + # shellcheck disable=SC2154 assert [ ${#stderr_lines[@]} -eq 0 ] } diff --git a/test/system/102-list.bats b/test/system/102-list.bats index 436ad27..7c9adc3 100644 --- a/test/system/102-list.bats +++ b/test/system/102-list.bats @@ -34,6 +34,8 @@ teardown() { assert_success assert [ ${#lines[@]} -eq 0 ] + + # shellcheck disable=SC2154 assert [ ${#stderr_lines[@]} -eq 0 ] } diff --git a/test/system/104-run.bats b/test/system/104-run.bats index e62cf72..9ea9e91 100644 --- a/test/system/104-run.bats +++ b/test/system/104-run.bats @@ -54,6 +54,8 @@ teardown() { assert_success assert [ ${#lines[@]} -eq 0 ] + + # shellcheck disable=SC2154 assert [ ${#stderr_lines[@]} -eq 0 ] } diff --git a/test/system/107-rmi.bats b/test/system/107-rmi.bats index 9022aa5..7d3a8f8 100644 --- a/test/system/107-rmi.bats +++ b/test/system/107-rmi.bats @@ -39,6 +39,8 @@ teardown() { assert_success assert [ ${#lines[@]} -eq 0 ] + + # shellcheck disable=SC2154 assert [ ${#stderr_lines[@]} -eq 0 ] num_of_images="$(list_images)" diff --git a/test/system/108-completion.bats b/test/system/108-completion.bats index bdc59b1..f8d3213 100644 --- a/test/system/108-completion.bats +++ b/test/system/108-completion.bats @@ -29,6 +29,8 @@ setup() { assert_success assert [ ${#lines[@]} -gt 0 ] + + # shellcheck disable=SC2154 assert [ ${#stderr_lines[@]} -eq 0 ] } diff --git a/test/system/libs/helpers.bash b/test/system/libs/helpers.bash index 89761fd..857f485 100644 --- a/test/system/libs/helpers.bash +++ b/test/system/libs/helpers.bash @@ -236,7 +236,10 @@ function build_image_without_name() { assert_line --index 1 --partial "LABEL com.github.containers.toolbox=\"true\"" assert_line --index 2 --partial "COMMIT" assert_line --index 3 --regexp "^--> [a-f0-9]{6,64}$" + + # shellcheck disable=SC2154 last=$((${#lines[@]}-1)) + assert_line --index "$last" --regexp "^[a-f0-9]{64}$" rm -f "$BATS_TEST_TMPDIR"/Containerfile @@ -440,6 +443,7 @@ function container_started() { run "$PODMAN" logs "$container_name" # Look for last line of the container startup log + # shellcheck disable=SC2154 if echo "$output" | grep "Listening to file system and ticker events"; then container_initialized=0 break