Skip to content
This repository was archived by the owner on Oct 3, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions hack/check-crds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
function check_crds() {
local crd_name=$1
for i in {1..12}
do
oc get crds | grep $crd_name
if [ $? == 0 ]
then
echo "CRD exists: " $crd_name
return 0
fi
sleep 5s
done
echo "CRD doesn't exist: " $crd_name
exit 1
}

check_crds components.devconsole.openshift.io
check_crds gitsourceanalyses.devconsole.openshift.io
check_crds gitsources.devconsole.openshift.io
4 changes: 1 addition & 3 deletions make/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ test-e2e-olm-ci: ./vendor
$(Q)sed -e "s,REPLACE_IMAGE,registry.svc.ci.openshift.org/${OPENSHIFT_BUILD_NAMESPACE}/stable:devconsole-operator-registry," ./test/e2e/catalog_source_OS4.yaml | oc apply -f -
$(Q)oc apply -f ./test/e2e/subscription_OS4.yaml
$(eval DEPLOYED_NAMESPACE := openshift-operators)
$(Q)oc wait crd/components.devconsole.openshift.io --for=condition=Established --timeout=300s
$(Q)oc wait crd/gitsourceanalyses.devconsole.openshift.io --for=condition=Established --timeout=300s
$(Q)oc wait crd/gitsources.devconsole.openshift.io --for=condition=Established --timeout=300s
$(Q)./hack/check-crds.sh
$(Q)operator-sdk test local ./test/e2e --no-setup --go-test-flags "-v -timeout=15m"

.PHONY: test-e2e-ci
Expand Down