Skip to content

Commit

Permalink
Update test to actually test for UID and Group
Browse files Browse the repository at this point in the history
  • Loading branch information
missylbytes committed Jun 28, 2024
1 parent 22dad5e commit 4ba20cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions control-plane/api-gateway/gatekeeper/gatekeeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/utils/pointer"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
gwv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
Expand Down Expand Up @@ -1479,6 +1480,11 @@ func validateResourcesExist(t *testing.T, client client.Client, helmConfig commo
assert.Equal(t, helmConfig.InitContainerResources.Limits, container.Resources.Limits)
assert.Equal(t, helmConfig.InitContainerResources.Requests, container.Resources.Requests)
}

if helmConfig.EnableOpenShift {
assert.Equal(t, container.SecurityContext.RunAsUser, pointer.Int64(1000700000))
assert.Equal(t, container.SecurityContext.RunAsGroup, pointer.Int64(1000700000))
}
}
}
assert.True(t, hasInitContainer)
Expand Down

0 comments on commit 4ba20cd

Please sign in to comment.