Skip to content

Commit

Permalink
Prepare setup for moving e2e to kind
Browse files Browse the repository at this point in the history
This will prepare the setup for moving e2e tests to
run on kind instead of gcp

Fix #1774
  • Loading branch information
piyush-garg authored and tekton-robot committed Mar 1, 2024
1 parent ea19645 commit e72a943
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions test/e2e-tests-kind-prow.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
E2E_SKIP_CLUSTER_CREATION=true
KO_DOCKER_REPO=registry.local:5000
ARTIFACTS=/workspace/source/artifacts
13 changes: 9 additions & 4 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ source $(dirname $0)/e2e-common.sh

cd $(dirname $(readlink -f $0))/../

E2E_SKIP_CLUSTER_CREATION=${E2E_SKIP_CLUSTER_CREATION:="false"}

ci_run && {
header "Setting up environment"
initialize $@
header "Setting up environment"
if [ "${E2E_SKIP_CLUSTER_CREATION}" != "true" ]; then
initialize "$@"
fi
}

tkn() {
Expand Down Expand Up @@ -155,9 +159,9 @@ for res in eventlistener triggertemplate triggerbinding clustertriggerbinding; d
kubectl delete --ignore-not-found=true ${res}.triggers.tekton.dev --all
done

# Run the e2e tests
export SYSTEM_NAMESPACE=${SYSTEM_NAMESPACE:-"tekton-pipelines"}
# Run go e2e tests
header "Running Go e2e tests"
export SYSTEM_NAMESPACE=${SYSTEM_NAMESPACE:-"tekton-pipelines"}
failed=0
if [[ -e ./bin/tkn ]];then
export TEST_CLIENT_BINARY="${PWD}/bin/tkn"
Expand All @@ -166,6 +170,7 @@ else
echo "Go Build successfull"
export TEST_CLIENT_BINARY="${PWD}/tkn"
fi

go_test_e2e ./test/e2e/... || failed=1
(( failed )) && fail_test

Expand Down

0 comments on commit e72a943

Please sign in to comment.