Skip to content

Commit

Permalink
Add open-cluster-management-policies namespace to the GRC watch names…
Browse files Browse the repository at this point in the history
…paces

Ref: https://issues.redhat.com/browse/ACM-13609
Signed-off-by: yiraeChristineKim <yikim@redhat.com>
  • Loading branch information
yiraeChristineKim authored and openshift-merge-bot[bot] committed Sep 25, 2024
1 parent 6fad01a commit 674f389
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ apiVersion: v1
kind: Namespace
metadata:
name: "{{ .Values.clusterName }}"
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright Contributors to the Open Cluster Management project

{{- if ne .Values.installMode "Hosted" }}
apiVersion: v1
kind: Namespace
metadata:
name: open-cluster-management-policies
{{- end }}
14 changes: 13 additions & 1 deletion test/e2e/case1_framework_deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const (
case1PodSelector string = "app=governance-policy-framework"
case1MWName string = "addon-governance-policy-framework-deploy-0"
case1MWPatch string = "../resources/manifestwork_add_patch.json"
ocmPolicyNs string = "open-cluster-management-policies"
)

var _ = Describe("Test framework deployment", Ordered, func() {
Expand Down Expand Up @@ -72,7 +73,7 @@ var _ = Describe("Test framework deployment", Ordered, func() {

By(logPrefix +
"removing the framework deployment when the ManagedClusterAddOn CR is removed")
Kubectl("delete", "-n", cluster.clusterName, "-f", case1ManagedClusterAddOnCR, "--timeout=90s")
Kubectl("delete", "-n", cluster.clusterName, "-f", case1ManagedClusterAddOnCR, "--timeout=180s")
deploy = GetWithTimeout(
cluster.clusterClient, gvrDeployment, case1DeploymentName, agentInstallNs, false, 180,
)
Expand All @@ -83,6 +84,11 @@ var _ = Describe("Test framework deployment", Ordered, func() {
}
pods := ListWithTimeoutByNamespace(cluster.clusterClient, gvrPod, opts, agentInstallNs, 0, false, 180)
Expect(pods).To(BeNil())

By("Should not have " + ocmPolicyNs + " in hosted mode")
GetWithTimeout(
cluster.clusterClient, gvrNamespace, ocmPolicyNs, "", false, 60,
)
}
})

Expand Down Expand Up @@ -316,6 +322,12 @@ var _ = Describe("Test framework deployment", Ordered, func() {
cluster.clusterClient, gvrDeployment, case1DeploymentName, addonNamespace, false, 30,
)
Expect(deploy).To(BeNil())

By("Should have " + ocmPolicyNs + " in normal mode")
ns := GetWithTimeout(
cluster.clusterClient, gvrNamespace, ocmPolicyNs, "", true, 60,
)
Expect(ns).ShouldNot(BeNil())
}
})

Expand Down

0 comments on commit 674f389

Please sign in to comment.