@@ -14,13 +14,13 @@ import (
1414
1515func TestPodSecurityContext (t * testing.T ) {
1616 t .Run ("Non-Openshift" , func (t * testing.T ) {
17- assert .Assert (t , cmp .MarshalMatches (PodSecurityContext (2 , []int64 {}, false ), `
17+ assert .Assert (t , cmp .MarshalMatches (PodSecurityContext (2 , []int64 {}), `
1818fsGroup: 2
1919fsGroupChangePolicy: OnRootMismatch
2020 ` ))
2121
2222 supplementalGroups := []int64 {3 , 4 }
23- assert .Assert (t , cmp .MarshalMatches (PodSecurityContext (26 , supplementalGroups , false ), `
23+ assert .Assert (t , cmp .MarshalMatches (PodSecurityContext (26 , supplementalGroups ), `
2424fsGroup: 26
2525fsGroupChangePolicy: OnRootMismatch
2626supplementalGroups:
@@ -30,11 +30,11 @@ supplementalGroups:
3030 })
3131
3232 t .Run ("OpenShift" , func (t * testing.T ) {
33- assert .Assert (t , cmp .MarshalMatches (PodSecurityContext (2 , []int64 {}, true ),
33+ assert .Assert (t , cmp .MarshalMatches (PodSecurityContext (0 , []int64 {}),
3434 `fsGroupChangePolicy: OnRootMismatch` ))
3535
3636 supplementalGroups := []int64 {3 , 4 }
37- assert .Assert (t , cmp .MarshalMatches (PodSecurityContext (2 , supplementalGroups , true ), `
37+ assert .Assert (t , cmp .MarshalMatches (PodSecurityContext (0 , supplementalGroups ), `
3838fsGroupChangePolicy: OnRootMismatch
3939supplementalGroups:
4040- 3
@@ -44,9 +44,9 @@ supplementalGroups:
4444
4545 t .Run ("NoRootGID" , func (t * testing.T ) {
4646 supplementalGroups := []int64 {999 , 0 , 100 , 0 }
47- assert .DeepEqual (t , []int64 {999 , 100 }, PodSecurityContext (2 , supplementalGroups , false ).SupplementalGroups )
47+ assert .DeepEqual (t , []int64 {999 , 100 }, PodSecurityContext (2 , supplementalGroups ).SupplementalGroups )
4848
4949 supplementalGroups = []int64 {0 }
50- assert .Assert (t , PodSecurityContext (2 , supplementalGroups , false ).SupplementalGroups == nil )
50+ assert .Assert (t , PodSecurityContext (2 , supplementalGroups ).SupplementalGroups == nil )
5151 })
5252}
0 commit comments