@@ -28,12 +28,6 @@ func TestEphemeralContainers(t *testing.T) {
28
28
stdOut , stdErr , err = e2e .Zarf (t , "package" , "deploy" , path , "--confirm" )
29
29
require .NoError (t , err , stdOut , stdErr )
30
30
31
- t .Cleanup (func () {
32
- // cleanup
33
- stdOut , stdErr , err = e2e .Zarf (t , "package" , "remove" , "basic-pod" , "--confirm" )
34
- require .NoError (t , err , stdOut , stdErr )
35
- })
36
-
37
31
// using a pod the package deploys - run a kubectl debug command
38
32
stdOut , stdErr , err = e2e .Kubectl (t , "debug" , "test-pod" , "-n" , "test" , "--image=busybox:1.36" , "--profile" , "general" )
39
33
require .NoError (t , err , stdOut , stdErr )
@@ -43,4 +37,10 @@ func TestEphemeralContainers(t *testing.T) {
43
37
podStdOut , _ , err := e2e .Kubectl (t , "get" , "pod" , "test-pod" , "-n" , "test" , "-o" , "jsonpath={.status.ephemeralContainerStatuses[*].image}" )
44
38
require .NoError (t , err )
45
39
require .Contains (t , podStdOut , "127.0.0.1:31337/library/busybox:1.36-zarf-" )
40
+
41
+ t .Cleanup (func () {
42
+ // cleanup
43
+ stdOut , stdErr , err = e2e .Zarf (t , "package" , "remove" , "basic-pod" , "--confirm" )
44
+ require .NoError (t , err , stdOut , stdErr )
45
+ })
46
46
}
0 commit comments