Skip to content

Commit

Permalink
test/system: Check the standard error & output streams separately
Browse files Browse the repository at this point in the history
  • Loading branch information
debarshiray committed Mar 21, 2023
1 parent 3c50af3 commit 1ba95dd
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions test/system/102-list.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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" {
Expand Down

0 comments on commit 1ba95dd

Please sign in to comment.