test/system: Group the test cases somewhat logically
A subsequent commit will test the order in which images with and without names are listed. It's logical for that test to come after the one about the basic support for images without names. https://github.com/containers/toolbox/pull/1192
This commit is contained in:
parent
f0a805af84
commit
54f09ae8a6
1 changed files with 19 additions and 19 deletions
|
@ -63,6 +63,25 @@ teardown() {
|
|||
assert_output ""
|
||||
}
|
||||
|
||||
@test "list: List an image without a name" {
|
||||
echo -e "FROM scratch\n\nLABEL com.github.containers.toolbox=\"true\"" > "$BATS_TMPDIR"/Containerfile
|
||||
|
||||
run $PODMAN build "$BATS_TMPDIR"
|
||||
|
||||
assert_success
|
||||
assert_line --index 0 --partial "FROM scratch"
|
||||
assert_line --index 1 --partial "LABEL com.github.containers.toolbox=\"true\""
|
||||
assert_line --index 2 --partial "COMMIT"
|
||||
assert_line --index 3 --regexp "^--> [a-z0-9]*$"
|
||||
|
||||
run --keep-empty-lines $TOOLBOX list
|
||||
|
||||
assert_success
|
||||
assert_line --index 1 --partial "<none>"
|
||||
|
||||
rm -f "$BATS_TMPDIR"/Containerfile
|
||||
}
|
||||
|
||||
@test "list: Try to list images and containers (no flag) with 3 containers and 2 images (the list should have 3 images and 2 containers)" {
|
||||
# Pull the two images
|
||||
pull_default_image
|
||||
|
@ -98,22 +117,3 @@ teardown() {
|
|||
assert_line --index 6 --partial "non-default-one"
|
||||
assert_line --index 7 --partial "non-default-two"
|
||||
}
|
||||
|
||||
@test "list: List an image without a name" {
|
||||
echo -e "FROM scratch\n\nLABEL com.github.containers.toolbox=\"true\"" > "$BATS_TMPDIR"/Containerfile
|
||||
|
||||
run $PODMAN build "$BATS_TMPDIR"
|
||||
|
||||
assert_success
|
||||
assert_line --index 0 --partial "FROM scratch"
|
||||
assert_line --index 1 --partial "LABEL com.github.containers.toolbox=\"true\""
|
||||
assert_line --index 2 --partial "COMMIT"
|
||||
assert_line --index 3 --regexp "^--> [a-z0-9]*$"
|
||||
|
||||
run --keep-empty-lines $TOOLBOX list
|
||||
|
||||
assert_success
|
||||
assert_line --index 1 --partial "<none>"
|
||||
|
||||
rm -f "$BATS_TMPDIR"/Containerfile
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue