Skip to content

Commit 3d6a33b

Browse files
authored
Fix downstream e2e test compatibility (#2144)
* Update busybox deployment SecurityContext * Don't panic at end of e2e test if PrintSummary fails Signed-off-by: Todd Short <[email protected]>
1 parent 3aede53 commit 3d6a33b

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

test/e2e/cluster_extension_install_test.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,17 @@ func TestClusterExtensionRecoversFromExistingDeploymentWhenFailureFixed(t *testi
10271027
ImagePullPolicy: corev1.PullAlways,
10281028
Name: "busybox",
10291029
SecurityContext: &corev1.SecurityContext{
1030-
RunAsNonRoot: ptr.To(true),
1031-
RunAsUser: ptr.To(int64(1000)),
1030+
RunAsNonRoot: ptr.To(true),
1031+
RunAsUser: ptr.To(int64(1000)),
1032+
AllowPrivilegeEscalation: ptr.To(false),
1033+
Capabilities: &corev1.Capabilities{
1034+
Drop: []corev1.Capability{
1035+
"ALL",
1036+
},
1037+
},
1038+
SeccompProfile: &corev1.SeccompProfile{
1039+
Type: corev1.SeccompProfileTypeRuntimeDefault,
1040+
},
10321041
},
10331042
},
10341043
},

test/e2e/e2e_suite_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package e2e
22

33
import (
44
"context"
5+
"fmt"
56
"os"
67
"testing"
78

@@ -40,7 +41,9 @@ func TestMain(m *testing.M) {
4041

4142
res := m.Run()
4243
err = utils.PrintSummary(testSummaryOutputEnvVar)
43-
utilruntime.Must(err)
44+
if err != nil {
45+
fmt.Println("PrintSummary error", err)
46+
}
4447
os.Exit(res)
4548
}
4649

0 commit comments

Comments
 (0)