test(eks): let the IMDS and pod identity test containers exit on SIGTERM (#4228)

This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-09-23 18:08:25 -05:00
1 parent 9956b684db
commit acafe73a2c
2 files changed
+6 -2

No files matched your search

@@ -108,7 +108,9 @@ class EksImdsDockerIntegrationTest {
.withName("floci-eks-imds-test-" + clusterName)
.withPrivileged(true)
.withHostDockerInternalOnLinux()
.withCmd(List.of("sleep", "300"))
// PID 1 gets no default SIGTERM handler, so a bare "sleep 300" sits out the
// whole stopAndRemove grace period when @AfterEach tears the container down.
.withCmd(List.of("sh", "-c", "trap 'exit 0' TERM; sleep 300 & wait"))
.build();
containerId = lifecycleManager.createAndStart(spec).containerId();
@@ -154,7 +154,9 @@ class EksPodIdentityDockerIntegrationTest {
.withName("floci-eks-pi-test-" + clusterName)
.withPrivileged(true)
.withHostDockerInternalOnLinux()
.withCmd(List.of("sleep", "300"))
// PID 1 gets no default SIGTERM handler, so a bare "sleep 300" sits out the
// whole stopAndRemove grace period when @AfterEach tears the container down.
.withCmd(List.of("sh", "-c", "trap 'exit 0' TERM; sleep 300 & wait"))
.build();
containerId = lifecycleManager.createAndStart(spec).containerId();