We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fa1a3e0 + 3cb3356 commit c2bde25Copy full SHA for c2bde25
test/cmd/apply.sh
@@ -144,6 +144,18 @@ run_kubectl_apply_tests() {
144
}
145
__EOF__
146
147
+ # Ensure the API server has recognized and started serving the associated CR API
148
+ local tries=5
149
+ for i in $(seq 1 $tries); do
150
+ local output
151
+ output=$(kubectl "${kube_flags[@]:?}" api-resources --api-group mygroup.example.com -oname)
152
+ if kube::test::if_has_string "$output" resources.mygroup.example.com; then
153
+ break
154
+ fi
155
+ echo "${i}: Waiting for CR API to be available"
156
+ sleep "$i"
157
+ done
158
+
159
# Dry-run create the CR
160
kubectl "${kube_flags[@]:?}" apply --dry-run=server -f hack/testdata/CRD/resource.yaml "${kube_flags[@]:?}"
161
# Make sure that the CR doesn't exist
0 commit comments