Skip to content

Commit 4959d47

Browse files
committed
fix(e2e): CleanUp locality within test
Signed-off-by: Brandt Keller <[email protected]>
1 parent e7c989b commit 4959d47

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/test/e2e/38_ephemeral_container_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ func TestEphemeralContainers(t *testing.T) {
2828
stdOut, stdErr, err = e2e.Zarf(t, "package", "deploy", path, "--confirm")
2929
require.NoError(t, err, stdOut, stdErr)
3030

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-
3731
// using a pod the package deploys - run a kubectl debug command
3832
stdOut, stdErr, err = e2e.Kubectl(t, "debug", "test-pod", "-n", "test", "--image=busybox:1.36", "--profile", "general")
3933
require.NoError(t, err, stdOut, stdErr)
@@ -43,4 +37,10 @@ func TestEphemeralContainers(t *testing.T) {
4337
podStdOut, _, err := e2e.Kubectl(t, "get", "pod", "test-pod", "-n", "test", "-o", "jsonpath={.status.ephemeralContainerStatuses[*].image}")
4438
require.NoError(t, err)
4539
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+
})
4646
}

0 commit comments

Comments
 (0)