Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
  • Loading branch information
tolusha committed Mar 4, 2021
1 parent dc6c5e0 commit c415d98
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,12 @@ login() {
}

deployDevWorkspaceController() {
oc patch checluster eclipse-che -n ${NAMESPACE} --type=merge -p '{"spec":{"devWorkspaces": {"enable": "true"}}}'
oc get checluster eclipse-che -n ${NAMESPACE} -o yaml
oc get crd checlusters.org.eclipse.che -o yaml
oc patch checluster eclipse-che -n ${NAMESPACE} --type=merge -p '{"spec":{"devWorkspace": {"enable": "true"}}}'
}

waitDevWorkspaceControllerStarted() {
n=0
while [ $n -le 5 ]
while [ $n -le 24 ]
do
webhooks=$(oc get mutatingWebhookConfiguration --all-namespaces)
echo "[INFO] Webhooks: ${webhooks}"
Expand All @@ -356,14 +354,14 @@ waitDevWorkspaceControllerStarted() {
return
fi

sleep 60
sleep 5
n=$(( n+1 ))

OPERATOR_POD=$(oc get pods -o json -n ${NAMESPACE} | jq -r '.items[] | select(.metadata.name | test("che-operator-")).metadata.name')
oc logs ${OPERATOR_POD} -n ${NAMESPACE}
done

echo "Failed to deploy Dev Workspace controller"
echo "[ERROR] Failed to deploy Dev Workspace controller"
OPERATOR_POD=$(oc get pods -o json -n ${NAMESPACE} | jq -r '.items[] | select(.metadata.name | test("che-operator-")).metadata.name')
oc logs ${OPERATOR_POD} -n ${NAMESPACE}

exit 1
}

Expand Down

0 comments on commit c415d98

Please sign in to comment.