From 1ba95dda000ebc5f16ea4c7cac715e9b26cd8978 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Tue, 21 Mar 2023 16:33:09 +0100 Subject: [PATCH] test/system: Check the standard error & output streams separately https://github.com/containers/toolbox/pull/1273 --- test/system/102-list.bats | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/test/system/102-list.bats b/test/system/102-list.bats index 1c331b4f1..392e85ca1 100644 --- a/test/system/102-list.bats +++ b/test/system/102-list.bats @@ -31,24 +31,27 @@ teardown() { @test "list: Smoke test" { - run --keep-empty-lines $TOOLBOX list + run --keep-empty-lines --separate-stderr $TOOLBOX list assert_success - assert_output "" + assert [ ${#lines[@]} -eq 0 ] + assert [ ${#stderr_lines[@]} -eq 0 ] } @test "list: Smoke test, with --containers" { - run --keep-empty-lines $TOOLBOX list --containers + run --keep-empty-lines --separate-stderr $TOOLBOX list --containers assert_success - assert_output "" + assert [ ${#lines[@]} -eq 0 ] + assert [ ${#stderr_lines[@]} -eq 0 ] } @test "list: Smoke test, with --images" { - run --keep-empty-lines $TOOLBOX list --images + run --keep-empty-lines --separate-stderr $TOOLBOX list --images assert_success - assert_output "" + assert [ ${#lines[@]} -eq 0 ] + assert [ ${#stderr_lines[@]} -eq 0 ] } @test "list: With just one non-Toolbx image" { @@ -58,10 +61,11 @@ teardown() { assert_output --partial "$BUSYBOX_IMAGE" - run --keep-empty-lines $TOOLBOX list + run --keep-empty-lines --separate-stderr $TOOLBOX list assert_success - assert_output "" + assert [ ${#lines[@]} -eq 0 ] + assert [ ${#stderr_lines[@]} -eq 0 ] } @test "list: An image without a name" {