test/system: Test 'rmi --all' without any images
https://github.com/containers/toolbox/pull/1195
This commit is contained in:
parent
e8f4e9c367
commit
8a37c08780
1 changed files with 20 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue