Skip to content

Commit

Permalink
Skip wait for authentication operator to start progressing when the S…
Browse files Browse the repository at this point in the history
…ecret already exists
  • Loading branch information
sanketpathak committed Jun 27, 2023
1 parent a0e7e98 commit bc79776
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions test-prow-e2e.sh
Expand Up @@ -50,14 +50,22 @@ BRIDGE_BASE_ADDRESS="$(oc get consoles.config.openshift.io cluster -o jsonpath='
export BRIDGE_BASE_ADDRESS

# Add htpasswd IDP
oc apply -f ./frontend/integration-tests/data/htpasswd-secret.yaml
oc patch oauths cluster --patch "$(cat ./frontend/integration-tests/data/patch-htpasswd.yaml)" --type=merge
set +x
echo "waiting for authentication operator to start Progressing 'test' idp..."
waitForAuthOperatorProgressing "True"
echo "waiting for authentication operator to finish Progressing 'test' idp..."
waitForAuthOperatorProgressing "False"
set -x
# Skip wait for authentication operator to start Progressing when the Secret already exists.
# And ignore any kind of errors when the Secret doesn't exist.

htpasswd_secret_name=$(oc get --ignore-not-found secret -n openshift-config htpass-secret -o name 2> /dev/null)


if [ "$htpasswd_secret_name" == "" ]; then
oc create -f ./frontend/integration-tests/data/htpasswd-secret.yaml
oc patch oauths cluster --patch "$(cat ./frontend/integration-tests/data/patch-htpasswd.yaml)" --type=merge
set +x
echo "waiting for authentication operator to start Progressing 'test' idp..."
waitForAuthOperatorProgressing "True"
echo "waiting for authentication operator to finish Progressing 'test' idp..."
waitForAuthOperatorProgressing "False"
set -x
fi

# "fake" dbus address to prevent errors
# https://github.com/SeleniumHQ/docker-selenium/issues/87
Expand Down

0 comments on commit bc79776

Please sign in to comment.