Skip to content
Merged
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
9 changes: 5 additions & 4 deletions scripts/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ function create_test_cluster() {
fi
# SSH keys are not used, but kubetest checks for their existence.
# Touch them so if they don't exist, empty files are create to satisfy the check.
mkdir -p $HOME/.ssh
touch $HOME/.ssh/google_compute_engine.pub
touch $HOME/.ssh/google_compute_engine
# Clear user and cluster variables, so they'll be set to the test cluster.
Expand Down Expand Up @@ -220,10 +221,6 @@ function create_test_cluster() {

# Setup the test cluster for running the tests.
function setup_test_cluster() {
# Fail fast during setup.
set -o errexit
set -o pipefail

# Set the required variables if necessary.
if [[ -z ${K8S_USER_OVERRIDE} ]]; then
export K8S_USER_OVERRIDE=$(gcloud config get-value core/account)
Expand Down Expand Up @@ -305,6 +302,10 @@ function initialize() {
readonly RUN_TESTS
readonly EMIT_METRICS

# Fail fast during setup.
set -o errexit
set -o pipefail

if (( ! RUN_TESTS )); then
create_test_cluster
else
Expand Down