diff --git a/.circleci/config.yml b/.circleci/config.yml index 1ab3bd28..047423cb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -94,6 +94,7 @@ jobs: - run: test/container-build.sh - run: test/e2e-kind.sh v1.18.2 - run: test/e2e-istio.sh + - run: test/e2e-istio-dependencies.sh - run: test/e2e-istio-tests.sh - run: test/e2e-istio-tests-skip-analysis.sh diff --git a/test/e2e-istio-dependencies.sh b/test/e2e-istio-dependencies.sh new file mode 100755 index 00000000..7bfe93cb --- /dev/null +++ b/test/e2e-istio-dependencies.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# This script setups the scenarios for istio tests by creating a Kubernetes namespace, installing the load tester and a test workload (podinfo) +# Prerequisites: Kubernetes Kind and Istio + +set -o errexit + +REPO_ROOT=$(git rev-parse --show-toplevel) + +echo '>>> Creating test namespace' +kubectl create namespace test +kubectl label namespace test istio-injection=enabled + +echo '>>> Installing the load tester' +kubectl apply -k ${REPO_ROOT}/kustomize/tester +kubectl -n test rollout status deployment/flagger-loadtester + +echo '>>> Deploy podinfo' +kubectl apply -f ${REPO_ROOT}/test/e2e-workload.yaml diff --git a/test/e2e-istio-tests-skip-analysis.sh b/test/e2e-istio-tests-skip-analysis.sh index c6f83db6..6cada2eb 100755 --- a/test/e2e-istio-tests-skip-analysis.sh +++ b/test/e2e-istio-tests-skip-analysis.sh @@ -3,21 +3,6 @@ # This script runs e2e tests for when the canary analysis is skipped # Prerequisites: Kubernetes Kind and Istio -set -o errexit - -REPO_ROOT=$(git rev-parse --show-toplevel) - -echo '>>> Creating test namespace' -kubectl create namespace test -kubectl label namespace test istio-injection=enabled - -echo '>>> Installing the load tester' -kubectl apply -k ${REPO_ROOT}/kustomize/tester -kubectl -n test rollout status deployment/flagger-loadtester - -echo '>>> Deploy podinfo' -kubectl apply -f ${REPO_ROOT}/test/e2e-workload.yaml - echo '>>> Create latency metric template' cat <>> Creating test namespace' -kubectl create namespace test -kubectl label namespace test istio-injection=enabled - -echo '>>> Installing the load tester' -kubectl apply -k ${REPO_ROOT}/kustomize/tester -kubectl -n test rollout status deployment/flagger-loadtester - -echo '>>> Deploy podinfo' -kubectl apply -f ${REPO_ROOT}/test/e2e-workload.yaml - echo '>>> Create latency metric template' cat <