diff --git a/test-network-function/generic/suite.go b/test-network-function/generic/suite.go index 410c7fcf4..789d43cde 100644 --- a/test-network-function/generic/suite.go +++ b/test-network-function/generic/suite.go @@ -156,6 +156,10 @@ var _ = ginkgo.Describe(testsKey, func() { testIsRedHatRelease(containersUnderTest.oc) } testIsRedHatRelease(testOrchestrator.oc) + + for _, containersUnderTest := range containersUnderTest { + testNamespace(containersUnderTest.oc) + } } }) @@ -242,3 +246,14 @@ func GetTestConfiguration() *tnfConfig.TestConfiguration { gomega.Expect(config).ToNot(gomega.BeNil()) return config } + +func testNamespace(oc *interactive.Oc) { + pod := oc.GetPodName() + container := oc.GetPodContainerName() + ginkgo.When(fmt.Sprintf("Reading namespace of %s/%s", pod, container), func() { + ginkgo.It("Should not be 'default' and should not begin with 'openshift-'", func() { + gomega.Expect(oc.GetPodNamespace()).To(gomega.Not(gomega.Equal("default"))) + gomega.Expect(oc.GetPodNamespace()).To(gomega.Not(gomega.HavePrefix("openshift-"))) + }) + }) +}