Skip to content

Commit 2eed169

Browse files
author
Amarthya Valija
committed
Fix: Add namespace to security context enforcement in tests
1 parent d5f094b commit 2eed169

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

osde2e/managed_cluster_validating_webhooks_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ var _ = Describe("Managed Cluster Validating Webhooks", Ordered, func() {
109109
It("should create a pod with the correct security context", func() {
110110
pod := &v1.Pod{
111111
ObjectMeta: metav1.ObjectMeta{
112-
Name: "testpod",
112+
Name: "testpod",
113+
Namespace: namespaceName,
113114
},
114115
Spec: v1.PodSpec{
115116
Containers: []v1.Container{
@@ -150,7 +151,8 @@ var _ = Describe("Managed Cluster Validating Webhooks", Ordered, func() {
150151
name := envconf.RandomName("testpod", 12)
151152
pod = &v1.Pod{
152153
ObjectMeta: metav1.ObjectMeta{
153-
Name: name,
154+
Name: name,
155+
Namespace: testNsName,
154156
},
155157
Spec: v1.PodSpec{
156158
Containers: []v1.Container{

0 commit comments

Comments
 (0)