Skip to content

Commit

Permalink
add e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yuval-k committed Apr 23, 2019
1 parent 5ba27c8 commit 3f8f634
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ jobs:
- run: test/e2e-build.sh
- run: test/e2e-tests.sh

e2e-supergloo-testing:
machine: true
steps:
- checkout
- run: test/e2e-kind.sh
- run: test/e2e-supergloo.sh
- run: test/e2e-build.sh supergloo:supergloo-system.test
- run: test/e2e-tests.sh

workflows:
version: 2
build-and-test:
Expand All @@ -20,3 +29,10 @@ workflows:
- /gh-pages.*/
- /docs-.*/
- /release-.*/
- e2e-supergloo-testing:
filters:
branches:
ignore:
- /gh-pages.*/
- /docs-.*/
- /release-.*/
1 change: 1 addition & 0 deletions artifacts/flagger/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
- ./flagger
- -log-level=info
- -control-loop-interval=10s
- -mesh-provider=$(MESH_PROVIDER)
- -metrics-server=http://prometheus.istio-system.svc.cluster.local:9090
livenessProbe:
exec:
Expand Down
5 changes: 5 additions & 0 deletions test/e2e-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@ cd ${REPO_ROOT} && docker build -t test/flagger:latest . -f Dockerfile
echo '>>> Installing Flagger'
kind load docker-image test/flagger:latest
kubectl apply -f ${REPO_ROOT}/artifacts/flagger/

if [ -n "$1" ]; then
kubectl -n istio-system set env deployment/flagger "MESH_PROVIDER=$1"
fi

kubectl -n istio-system set image deployment/flagger flagger=test/flagger:latest
kubectl -n istio-system rollout status deployment/flagger
28 changes: 28 additions & 0 deletions test/e2e-supergloo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

set -o errexit

ISTIO_VER="1.0.6"
REPO_ROOT=$(git rev-parse --show-toplevel)
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"

echo ">>> Downloading Supergloo CLI"
curl -SsL https://github.com/solo-io/supergloo/releases/download/v0.3.13/supergloo-cli-linux-amd64 > supergloo-cli
chmod +x supergloo-cli

echo ">>> Installing Supergloo"
./supergloo-cli init
echo ">>> Installing Istio ${ISTIO_VER}"
kubectl create ns istio-system
./supergloo-cli install istio --name test --namespace supergloo-system --auto-inject true --installation-namespace istio-system --mtls false --prometheus true --version ${ISTIO_VER}

echo '>>> Waiting for Istio to be ready'
until kubectl -n supergloo-system get mesh test
do
sleep 2
done

# add rbac rules
kubectl create clusterrolebinding flagger-supergloo --clusterrole=mesh-discovery --serviceaccount=istio-system:flagger

kubectl -n istio-system get all

0 comments on commit 3f8f634

Please sign in to comment.