diff --git a/test/system/102-list.bats b/test/system/102-list.bats index cc50bab..8b220ac 100644 --- a/test/system/102-list.bats +++ b/test/system/102-list.bats @@ -20,6 +20,7 @@ load 'libs/bats-assert/load' load 'libs/helpers' setup() { + bats_require_minimum_version 1.7.0 _setup_environment cleanup_all } @@ -71,9 +72,7 @@ teardown() { assert_success assert_line --index 1 --partial "" assert [ ${#lines[@]} -eq 3 ] - if check_bats_version 1.7.0; then - assert [ ${#stderr_lines[@]} -eq 0 ] - fi + assert [ ${#stderr_lines[@]} -eq 0 ] } @test "list: Image and its copy" { @@ -92,9 +91,7 @@ teardown() { assert_line --index 1 --partial "$default_image" assert_line --index 2 --partial "$default_image-copy" assert [ ${#lines[@]} -eq 4 ] - if check_bats_version 1.7.0; then - assert [ ${#stderr_lines[@]} -eq 0 ] - fi + assert [ ${#stderr_lines[@]} -eq 0 ] } @test "list: Containers and images" { @@ -114,9 +111,7 @@ teardown() { assert_line --index 1 --partial "fedora-toolbox:34" assert_line --index 2 --partial "$(get_system_id)-toolbox:$(get_system_version)" assert [ ${#lines[@]} -eq 4 ] - if check_bats_version 1.7.0; then - assert [ ${#stderr_lines[@]} -eq 0 ] - fi + assert [ ${#stderr_lines[@]} -eq 0 ] # Check containers run --keep-empty-lines --separate-stderr $TOOLBOX list --containers @@ -126,9 +121,7 @@ teardown() { assert_line --index 2 --partial "non-default-one" assert_line --index 3 --partial "non-default-two" assert [ ${#lines[@]} -eq 5 ] - if check_bats_version 1.7.0; then - assert [ ${#stderr_lines[@]} -eq 0 ] - fi + assert [ ${#stderr_lines[@]} -eq 0 ] # Check all together run --keep-empty-lines --separate-stderr $TOOLBOX list @@ -140,9 +133,7 @@ teardown() { assert_line --index 6 --partial "non-default-one" assert_line --index 7 --partial "non-default-two" assert [ ${#lines[@]} -eq 9 ] - if check_bats_version 1.7.0; then - assert [ ${#stderr_lines[@]} -eq 0 ] - fi + assert [ ${#stderr_lines[@]} -eq 0 ] } @test "list: Images with and without names" { @@ -160,7 +151,5 @@ teardown() { assert_line --index 2 --partial "fedora-toolbox:34" assert_line --index 3 --partial "$default_image" assert [ ${#lines[@]} -eq 5 ] - if check_bats_version 1.7.0; then - assert [ ${#stderr_lines[@]} -eq 0 ] - fi + assert [ ${#stderr_lines[@]} -eq 0 ] }