kube-prometheus: Add e2e tests
This commit is contained in:
24
tests/e2e/travis-e2e.sh
Executable file
24
tests/e2e/travis-e2e.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# exit immediately when a command fails
|
||||
set -e
|
||||
# only exit with zero if all commands of the pipeline exit successfully
|
||||
set -o pipefail
|
||||
# error on unset variables
|
||||
set -u
|
||||
# print each command before executing it
|
||||
set -x
|
||||
|
||||
SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
|
||||
"${SCRIPT_DIR}"/../../../../scripts/create-minikube.sh
|
||||
|
||||
# waiting for kube-dns to be ready
|
||||
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl -n kube-system get pods -lk8s-app=kube-dns -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1;echo "waiting for kube-dns to be available"; kubectl get pods --all-namespaces; done
|
||||
|
||||
(
|
||||
cd "${SCRIPT_DIR}"/../.. || exit
|
||||
kubectl apply -f manifests
|
||||
KUBECONFIG=~/.kube/config make test-e2e
|
||||
)
|
||||
|
||||
"${SCRIPT_DIR}"/../../../../scripts/delete-minikube.sh
|
Reference in New Issue
Block a user