github.com/percona/percona-xtradb-cluster-operator@v1.14.0/e2e-tests/storage/run (about) 1 #!/bin/bash 2 3 set -o errexit 4 5 test_dir=$(realpath $(dirname $0)) 6 . ${test_dir}/../functions 7 8 set_debug 9 10 if [ -n "${OPENSHIFT}" ]; then 11 echo "This test is not supported on OpenShift because hostpath is not allowed by default" 12 exit 0 13 fi 14 15 check_cr_config() { 16 local cluster="$1" 17 18 desc "apply cr config" 19 spinup_pxc "$cluster" "$test_dir/conf/$cluster.yml" 20 21 desc "check if statefulset created with expected config" 22 compare_kubectl statefulset/$cluster-pxc 23 compare_kubectl statefulset/$cluster-proxysql 24 25 desc "delete cluster" 26 kubectl_bin delete \ 27 -f $test_dir/conf/$cluster.yml 28 } 29 30 main() { 31 create_infra $namespace 32 33 apply_config "$conf_dir/client.yml" 34 kubectl_bin apply \ 35 -f $conf_dir/secrets.yml \ 36 -f $test_dir/conf/hostpath-helper.yml 37 38 desc 'check emptydir' 39 check_cr_config "emptydir" 40 41 desc 'check hostpath' 42 check_cr_config "hostpath" 43 44 destroy $namespace 45 desc "test passed" 46 } 47 48 main