Skip to content

Commit c31104f

Browse files
committed
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>
1 parent 09cf145 commit c31104f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/system/702-artifact.bats

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ function teardown() {
6464

6565
# Verify we have 2 layers now
6666
assert "$layer_count" -eq 2 "Should have 2 layers after append"
67+
68+
run_podman artifact rm "$artifact_name"
6769
}
6870

6971

@@ -93,7 +95,6 @@ function teardown() {
9395

9496
# Cleanup
9597
run_podman artifact rm "$artifact_name"
96-
rm -f "$file1" "$file2"
9798
}
9899

99100
@test "podman artifact add --replace nonexistent artifact" {
@@ -110,7 +111,6 @@ function teardown() {
110111

111112
# Cleanup
112113
run_podman artifact rm "$artifact_name"
113-
rm -f "$file1"
114114
}
115115

116116
@test "podman artifact add --replace and --append conflict" {
@@ -122,8 +122,6 @@ function teardown() {
122122
# Using --replace and --append together should fail
123123
run_podman 125 artifact add --replace --append "$artifact_name" "$file1"
124124
assert "$output" =~ "--append and --replace options cannot be used together"
125-
126-
rm -f "$file1"
127125
}
128126

129127
@test "podman artifact add --replace with existing artifact" {
@@ -151,7 +149,6 @@ function teardown() {
151149

152150
# Cleanup
153151
run_podman artifact rm "$artifact_name"
154-
rm -f "$file1" "$file2"
155152
}
156153

157154

0 commit comments

Comments
 (0)