test/system: Silence SC2154
Otherwise https://www.shellcheck.net/ would complain: Line 33: assert [ ${#stderr_lines[@]} -eq 0 ] ^-----------------^ SC2154 (warning): stderr_lines is referenced but not assigned. See: https://www.shellcheck.net/wiki/SC2154 https://github.com/containers/toolbox/pull/1369
This commit is contained in:
parent
74d2f2180d
commit
7d24e98070
6 changed files with 14 additions and 0 deletions
|
@ -30,5 +30,7 @@ setup() {
|
||||||
assert_success
|
assert_success
|
||||||
assert_output --regexp '^toolbox version [0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?$'
|
assert_output --regexp '^toolbox version [0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?$'
|
||||||
assert [ ${#lines[@]} -eq 1 ]
|
assert [ ${#lines[@]} -eq 1 ]
|
||||||
|
|
||||||
|
# shellcheck disable=SC2154
|
||||||
assert [ ${#stderr_lines[@]} -eq 0 ]
|
assert [ ${#stderr_lines[@]} -eq 0 ]
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,8 @@ teardown() {
|
||||||
|
|
||||||
assert_success
|
assert_success
|
||||||
assert [ ${#lines[@]} -eq 0 ]
|
assert [ ${#lines[@]} -eq 0 ]
|
||||||
|
|
||||||
|
# shellcheck disable=SC2154
|
||||||
assert [ ${#stderr_lines[@]} -eq 0 ]
|
assert [ ${#stderr_lines[@]} -eq 0 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,8 @@ teardown() {
|
||||||
|
|
||||||
assert_success
|
assert_success
|
||||||
assert [ ${#lines[@]} -eq 0 ]
|
assert [ ${#lines[@]} -eq 0 ]
|
||||||
|
|
||||||
|
# shellcheck disable=SC2154
|
||||||
assert [ ${#stderr_lines[@]} -eq 0 ]
|
assert [ ${#stderr_lines[@]} -eq 0 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,8 @@ teardown() {
|
||||||
|
|
||||||
assert_success
|
assert_success
|
||||||
assert [ ${#lines[@]} -eq 0 ]
|
assert [ ${#lines[@]} -eq 0 ]
|
||||||
|
|
||||||
|
# shellcheck disable=SC2154
|
||||||
assert [ ${#stderr_lines[@]} -eq 0 ]
|
assert [ ${#stderr_lines[@]} -eq 0 ]
|
||||||
|
|
||||||
num_of_images="$(list_images)"
|
num_of_images="$(list_images)"
|
||||||
|
|
|
@ -29,6 +29,8 @@ setup() {
|
||||||
|
|
||||||
assert_success
|
assert_success
|
||||||
assert [ ${#lines[@]} -gt 0 ]
|
assert [ ${#lines[@]} -gt 0 ]
|
||||||
|
|
||||||
|
# shellcheck disable=SC2154
|
||||||
assert [ ${#stderr_lines[@]} -eq 0 ]
|
assert [ ${#stderr_lines[@]} -eq 0 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -236,7 +236,10 @@ function build_image_without_name() {
|
||||||
assert_line --index 1 --partial "LABEL com.github.containers.toolbox=\"true\""
|
assert_line --index 1 --partial "LABEL com.github.containers.toolbox=\"true\""
|
||||||
assert_line --index 2 --partial "COMMIT"
|
assert_line --index 2 --partial "COMMIT"
|
||||||
assert_line --index 3 --regexp "^--> [a-f0-9]{6,64}$"
|
assert_line --index 3 --regexp "^--> [a-f0-9]{6,64}$"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2154
|
||||||
last=$((${#lines[@]}-1))
|
last=$((${#lines[@]}-1))
|
||||||
|
|
||||||
assert_line --index "$last" --regexp "^[a-f0-9]{64}$"
|
assert_line --index "$last" --regexp "^[a-f0-9]{64}$"
|
||||||
|
|
||||||
rm -f "$BATS_TEST_TMPDIR"/Containerfile
|
rm -f "$BATS_TEST_TMPDIR"/Containerfile
|
||||||
|
@ -440,6 +443,7 @@ function container_started() {
|
||||||
run "$PODMAN" logs "$container_name"
|
run "$PODMAN" logs "$container_name"
|
||||||
|
|
||||||
# Look for last line of the container startup log
|
# Look for last line of the container startup log
|
||||||
|
# shellcheck disable=SC2154
|
||||||
if echo "$output" | grep "Listening to file system and ticker events"; then
|
if echo "$output" | grep "Listening to file system and ticker events"; then
|
||||||
container_initialized=0
|
container_initialized=0
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue