Add acceptance test (#168)

To ease verifying the controller to work before submitting/merging PRs and releasing a new version of the controller.
This commit is contained in:
Yusuke Kuoka
2020-11-14 20:07:14 +09:00
committed by GitHub
parent 8ccf64080c
commit bbfe03f02b
6 changed files with 118 additions and 0 deletions

29
acceptance/checks.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -e
runner_name=
while [ -z "${runner_name}" ]; do
echo Finding the runner... 1>&2
sleep 1
runner_name=$(kubectl get runner --output=jsonpath="{.items[*].metadata.name}")
done
echo Found runner ${runner_name}.
pod_name=
while [ -z "${pod_name}" ]; do
echo Finding the runner pod... 1>&2
sleep 1
pod_name=$(kubectl get pod --output=jsonpath="{.items[*].metadata.name}" | grep ${runner_name})
done
echo Found pod ${pod_name}.
echo Waiting for pod ${runner_name} to become ready... 1>&2
kubectl wait pod/${runner_name} --for condition=ready --timeout 120s
echo All tests passed. 1>&2