@@ -11,6 +11,7 @@ import (
11
11
k8serrors "k8s.io/apimachinery/pkg/api/errors"
12
12
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
13
13
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
14
+ "open-cluster-management.io/governance-policy-propagator/test/utils"
14
15
15
16
"github.com/stolostron/governance-policy-framework/test/common"
16
17
)
@@ -107,6 +108,8 @@ var _ = Describe("GRC: [P1][Sev1][policy-grc] Test the ACM Hardening "+
107
108
1 ,
108
109
).Should (BeNil ())
109
110
111
+ eCounter := 10
112
+
110
113
By ("Checking that the policy-managedclusteraddon-available policy " +
111
114
"was propagated to the local-cluster namespace" )
112
115
Eventually (
@@ -117,6 +120,48 @@ var _ = Describe("GRC: [P1][Sev1][policy-grc] Test the ACM Hardening "+
117
120
metav1.GetOptions {},
118
121
)
119
122
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
+
120
165
return err
121
166
},
122
167
defaultTimeoutSeconds * 2 ,
0 commit comments