diff --git a/test/system/107-rmi.bats b/test/system/107-rmi.bats index c219f92..37cdede 100644 --- a/test/system/107-rmi.bats +++ b/test/system/107-rmi.bats @@ -29,6 +29,26 @@ teardown() { } +@test "rmi: '--all' without any images" { + local num_of_images + num_of_images="$(list_images)" + assert_equal "$num_of_images" 0 + + run --keep-empty-lines --separate-stderr "$TOOLBOX" rmi --all + + assert_success + assert_output "" + output="$stderr" + assert_output "" + if check_bats_version 1.7.0; then + assert [ ${#lines[@]} -eq 0 ] + assert [ ${#stderr_lines[@]} -eq 0 ] + fi + + num_of_images="$(list_images)" + assert_equal "$num_of_images" 0 +} + @test "rmi: Remove all images with the default image present" { num_of_images=$(list_images) assert_equal "$num_of_images" 0