@@ -27,6 +27,7 @@ const (
2727 case1PodSelector string = "app=governance-policy-framework"
2828 case1MWName string = "addon-governance-policy-framework-deploy-0"
2929 case1MWPatch string = "../resources/manifestwork_add_patch.json"
30+ ocmPolicyNs string = "open-cluster-management-policies"
3031)
3132
3233var _ = Describe ("Test framework deployment" , Ordered , func () {
@@ -72,7 +73,7 @@ var _ = Describe("Test framework deployment", Ordered, func() {
7273
7374 By (logPrefix +
7475 "removing the framework deployment when the ManagedClusterAddOn CR is removed" )
75- Kubectl ("delete" , "-n" , cluster .clusterName , "-f" , case1ManagedClusterAddOnCR , "--timeout=90s " )
76+ Kubectl ("delete" , "-n" , cluster .clusterName , "-f" , case1ManagedClusterAddOnCR , "--timeout=180s " )
7677 deploy = GetWithTimeout (
7778 cluster .clusterClient , gvrDeployment , case1DeploymentName , agentInstallNs , false , 180 ,
7879 )
@@ -83,6 +84,11 @@ var _ = Describe("Test framework deployment", Ordered, func() {
8384 }
8485 pods := ListWithTimeoutByNamespace (cluster .clusterClient , gvrPod , opts , agentInstallNs , 0 , false , 180 )
8586 Expect (pods ).To (BeNil ())
87+
88+ By ("Should not have " + ocmPolicyNs + " in hosted mode" )
89+ GetWithTimeout (
90+ cluster .clusterClient , gvrNamespace , ocmPolicyNs , "" , false , 60 ,
91+ )
8692 }
8793 })
8894
@@ -316,6 +322,12 @@ var _ = Describe("Test framework deployment", Ordered, func() {
316322 cluster .clusterClient , gvrDeployment , case1DeploymentName , addonNamespace , false , 30 ,
317323 )
318324 Expect (deploy ).To (BeNil ())
325+
326+ By ("Should have " + ocmPolicyNs + " in normal mode" )
327+ ns := GetWithTimeout (
328+ cluster .clusterClient , gvrNamespace , ocmPolicyNs , "" , true , 60 ,
329+ )
330+ Expect (ns ).ShouldNot (BeNil ())
319331 }
320332 })
321333
0 commit comments