github.com/percona/percona-xtradb-cluster-operator@v1.14.0/e2e-tests/big-data/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  main() {
    11  	if [ -n "$SKIP_REMOTE_BACKUPS" ]; then
    12  		echo 'Skip big-data test.'
    13  		exit 0
    14  	fi
    15  
    16  	create_infra $namespace
    17  	deploy_cert_manager
    18  
    19  	desc 'create first PXC cluster'
    20  	cluster="some-name"
    21  	spinup_pxc "$cluster" "$test_dir/conf/$cluster.yml" "3" "10" "$test_dir/conf/secrets_without_tls.yml"
    22  
    23  	if [[ $IMAGE_PXC =~ 8\.0 ]]; then
    24  		desc 'Switch to 8.0 backup'
    25  		kubectl_bin apply -f "${test_dir}/conf/restore-backup.yml"
    26  	else
    27  		kubectl_bin apply -f "${test_dir}/conf/restore-backup-57.yml"
    28  	fi
    29  	sleep 10
    30  	wait_backup_restore "restore1" "Succeeded" 1500
    31  	wait_for_running "$cluster-proxysql" 1
    32  	wait_for_running "$cluster-pxc" 3
    33  	desc "delete pvc and pod for pxc-2"
    34  	kubectl_bin delete pvc/"datadir-$cluster-pxc-2" pod/"$cluster-pxc-2"
    35  	sleep 1
    36  	kubectl_bin delete pod/"$cluster-pxc-2"
    37  
    38  	wait_for_running "$cluster-pxc" 3 800
    39  	destroy $namespace
    40  	desc "test passed"
    41  }
    42  
    43  main