Skip to content

Commit eb90e9e

Browse files
author
Anthony Landreth
committed
Updates security_test
1 parent aea931a commit eb90e9e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/initialize/security_test.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ func TestPodSecurityContext(t *testing.T) {
6060
assert.Assert(t, psc.RunAsUser == nil,
6161
`Containers must not set runAsUser to 0`)
6262

63-
assert.Assert(t, psc.SeccompProfile == nil,
64-
`SeccompProfile must be set to RuntimeDefault.`)
63+
if assert.Check(t, psc.SeccompProfile == nil) {
64+
assert.Assert(t, initialize.RestrictedSecurityContext().SeccompProfile != nil,
65+
`SeccompProfile should be delegated to the container-level v1.SecurityContext`)
66+
}
6567
})
6668
}
6769

0 commit comments

Comments
 (0)