Skip to content

Commit

Permalink
Merge pull request #304 from Kuadrant/e2e/fix-ns
Browse files Browse the repository at this point in the history
[e2e] Fix namespace name + wait timeout (2)
  • Loading branch information
guicassolato authored Jun 14, 2022
2 parents c41dc2e + 400a676 commit defff16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ cover: ## Shows test coverage

VERBOSE ?= 0
e2e: ## Runs the end-to-end tests on a local environment setup
$(MAKE) local-setup NAMESPACE=$(NAMESPACE) KIND_CLUSTER_NAME=authorino-e2e AUTHORINO_IMAGE=$(AUTHORINO_IMAGE) TLS_ENABLED=$(TLS_ENABLED) OPERATOR_BRANCH=$(OPERATOR_BRANCH) AUTHORINO_MANIFESTS=$(AUTHORINO_MANIFESTS) AUTHORINO_INSTANCE=$(AUTHORINO_INSTANCE) ENVOY_OVERLAY=$(ENVOY_OVERLAY) DEPLOY_KEYCLOAK=1 FF=1
NAMESPACE=$(NAMESPACE) VERBOSE=$(VERBOSE) ./tests/e2e-test.sh
$(MAKE) local-setup NAMESPACE=authorino KIND_CLUSTER_NAME=authorino-e2e AUTHORINO_IMAGE=$(AUTHORINO_IMAGE) TLS_ENABLED=$(TLS_ENABLED) OPERATOR_BRANCH=$(OPERATOR_BRANCH) AUTHORINO_MANIFESTS=$(AUTHORINO_MANIFESTS) AUTHORINO_INSTANCE=$(AUTHORINO_INSTANCE) ENVOY_OVERLAY=$(ENVOY_OVERLAY) DEPLOY_KEYCLOAK=1 FF=1
NAMESPACE=authorino VERBOSE=$(VERBOSE) ./tests/e2e-test.sh

##@ Apps

Expand Down
6 changes: 6 additions & 0 deletions tests/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ done
namespace=${NAMESPACE:-"authorino"}
authconfig=${AUTHCONFIG:-"$(dirname $(realpath $0))/authconfig.yaml"}
verbose=${VERBOSE}
timeout=${TIMEOUT:-"600"}

HOSTNAME="talker-api-authorino.127.0.0.1.nip.io"
IP_IN="109.69.200.56" # IT
Expand All @@ -20,13 +21,18 @@ test_count=0
function wait_until {
local what=$1; shift
local condition=$1; shift
local start_time=$SECONDS
printf "waiting ${what}"
while : ; do
if [[ "$($1)" =~ $condition ]]; then
break
fi
printf "."
sleep 3
if [ $(($SECONDS - $start_time)) -gt $timeout ]; then
printf " (timeout)"
teardown "FAIL"
fi
done
echo " condition met"
}
Expand Down

0 comments on commit defff16

Please sign in to comment.