Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahalsmiller committed Mar 11, 2025
1 parent 7b28ef3 commit ed6dc76
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions control-plane/connect-inject/webhook/container_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ func TestHandlerContainerInit_transparentProxy(t *testing.T) {
var expectedSecurityContext *corev1.SecurityContext
if c.cniEnabled && !c.openShiftEnabled {
expectedSecurityContext = &corev1.SecurityContext{
SeccompProfile: &corev1.SeccompProfile{
Type: corev1.SeccompProfileTypeRuntimeDefault,
},
RunAsUser: ptr.To(int64(initContainersUserAndGroupID)),
RunAsGroup: ptr.To(int64(initContainersUserAndGroupID)),
RunAsNonRoot: ptr.To(true),
Expand All @@ -319,6 +322,9 @@ func TestHandlerContainerInit_transparentProxy(t *testing.T) {
} else if c.cniEnabled && c.openShiftEnabled {
// When cni + openShift
expectedSecurityContext = &corev1.SecurityContext{
SeccompProfile: &corev1.SeccompProfile{
Type: corev1.SeccompProfileTypeRuntimeDefault,
},
RunAsUser: ptr.To(int64(1000799999)),
RunAsGroup: ptr.To(int64(1000799999)),
RunAsNonRoot: ptr.To(true),
Expand Down

0 comments on commit ed6dc76

Please sign in to comment.