mirror of
https://github.com/containers/podman.git
synced 2025-11-30 10:07:33 +08:00
test/system: fix artifact test cleanup
Make sure to rmeove the artifact but we don't need to remove the testfiles as they are part under PODMAN_TMPDIR which gets removed by default so don't bother with that. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -64,6 +64,8 @@ function teardown() {
|
|||||||
|
|
||||||
# Verify we have 2 layers now
|
# Verify we have 2 layers now
|
||||||
assert "$layer_count" -eq 2 "Should have 2 layers after append"
|
assert "$layer_count" -eq 2 "Should have 2 layers after append"
|
||||||
|
|
||||||
|
run_podman artifact rm "$artifact_name"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -93,7 +95,6 @@ function teardown() {
|
|||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
run_podman artifact rm "$artifact_name"
|
run_podman artifact rm "$artifact_name"
|
||||||
rm -f "$file1" "$file2"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "podman artifact add --replace nonexistent artifact" {
|
@test "podman artifact add --replace nonexistent artifact" {
|
||||||
@@ -110,7 +111,6 @@ function teardown() {
|
|||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
run_podman artifact rm "$artifact_name"
|
run_podman artifact rm "$artifact_name"
|
||||||
rm -f "$file1"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "podman artifact add --replace and --append conflict" {
|
@test "podman artifact add --replace and --append conflict" {
|
||||||
@@ -122,8 +122,6 @@ function teardown() {
|
|||||||
# Using --replace and --append together should fail
|
# Using --replace and --append together should fail
|
||||||
run_podman 125 artifact add --replace --append "$artifact_name" "$file1"
|
run_podman 125 artifact add --replace --append "$artifact_name" "$file1"
|
||||||
assert "$output" =~ "--append and --replace options cannot be used together"
|
assert "$output" =~ "--append and --replace options cannot be used together"
|
||||||
|
|
||||||
rm -f "$file1"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "podman artifact add --replace with existing artifact" {
|
@test "podman artifact add --replace with existing artifact" {
|
||||||
@@ -151,7 +149,6 @@ function teardown() {
|
|||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
run_podman artifact rm "$artifact_name"
|
run_podman artifact rm "$artifact_name"
|
||||||
rm -f "$file1" "$file2"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user