Bash tests for Openshift and Kubernetes taken from https://github.com/openshift/origin/tree/master/hack/lib Feel free to use it, preferably as a git submodule.
- source the init script and setup time vars:
source "../test/lib/init.sh"
os::util::environment::setup_time_vars
- start Kubernetes of OpenShift
- call the assertions
os::test::junit::declare_suite_start "operator/tests"
os::cmd::expect_success_and_text "kubectl create -f ../manifest/operator.yaml" '"?spark-operator"? created'
os::cmd::try_until_text "kubectl get pod -l app.kubernetes.io/name=spark-operator -o yaml" 'ready: true'
os::test::junit::declare_suite_end
(example)
- profit