Skip to content

Commit 27af7b7

Browse files
committed
Add some debug
Signed-off-by: Justin Kulikauskas <[email protected]>
1 parent eb0d17d commit 27af7b7

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

test/integration/policy_generator_acm_hardening_test.go

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
k8serrors "k8s.io/apimachinery/pkg/api/errors"
1212
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1313
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
14+
"open-cluster-management.io/governance-policy-propagator/test/utils"
1415

1516
"github.com/stolostron/governance-policy-framework/test/common"
1617
)
@@ -107,6 +108,8 @@ var _ = Describe("GRC: [P1][Sev1][policy-grc] Test the ACM Hardening "+
107108
1,
108109
).Should(BeNil())
109110

111+
eCounter := 10
112+
110113
By("Checking that the policy-managedclusteraddon-available policy " +
111114
"was propagated to the local-cluster namespace")
112115
Eventually(
@@ -117,6 +120,48 @@ var _ = Describe("GRC: [P1][Sev1][policy-grc] Test the ACM Hardening "+
117120
metav1.GetOptions{},
118121
)
119122

123+
if eCounter > 9 {
124+
eCounter = 0
125+
126+
GinkgoWriter.Print("placement: ")
127+
_, _ = utils.KubectlWithOutput("get", "placement", "-A", "-ojsonpath={@}",
128+
"--kubeconfig="+kubeconfigHub)
129+
130+
GinkgoWriter.Print("placementdecision: ")
131+
_, _ = utils.KubectlWithOutput("get", "placementdecision", "-A", "-ojsonpath={@}",
132+
"--kubeconfig="+kubeconfigHub)
133+
134+
GinkgoWriter.Print("placementbinding: ")
135+
_, _ = utils.KubectlWithOutput("get", "placementbinding", "-A", "-ojsonpath={@}",
136+
"--kubeconfig="+kubeconfigHub)
137+
138+
GinkgoWriter.Print("policyset: ")
139+
_, _ = utils.KubectlWithOutput("get", "policyset", "-A", "-ojsonpath={@}",
140+
"--kubeconfig="+kubeconfigHub)
141+
142+
GinkgoWriter.Print("policy: ")
143+
_, _ = utils.KubectlWithOutput("get", "policy", "-A", "-ojsonpath={@}",
144+
"--kubeconfig="+kubeconfigHub)
145+
146+
GinkgoWriter.Print("managedcluster: ")
147+
_, _ = utils.KubectlWithOutput("get", "managedcluster", "-A", "-ojsonpath={@}",
148+
"--kubeconfig="+kubeconfigHub)
149+
150+
GinkgoWriter.Print("managedclusterset: ")
151+
_, _ = utils.KubectlWithOutput("get", "managedclusterset", "-A", "-ojsonpath={@}",
152+
"--kubeconfig="+kubeconfigHub)
153+
154+
GinkgoWriter.Print("managedclustersetbinding: ")
155+
_, _ = utils.KubectlWithOutput("get", "managedclustersetbinding", "-A", "-ojsonpath={@}",
156+
"--kubeconfig="+kubeconfigHub)
157+
158+
GinkgoWriter.Print("open-cluster-management-hub pods: ")
159+
_, _ = utils.KubectlWithOutput("get", "pods", "-n=open-cluster-management-hub", "-ojsonpath={@}",
160+
"--kubeconfig="+kubeconfigHub)
161+
}
162+
163+
eCounter++
164+
120165
return err
121166
},
122167
defaultTimeoutSeconds*2,

0 commit comments

Comments
 (0)