Unverified Commit 015c0344 authored by Karthik Satchitanand's avatar Karthik Satchitanand Committed by GitHub

Merge pull request #13 from gprasath/snap-k8s

feat(test):Executing snapshot/clone functional test on cstor volume in packet pipeline.
parents fc864d79 715b9696
......@@ -227,6 +227,13 @@ k8s-snapshot-clone-creation-{percona-jiva}:
script:
- ./script/apps/percona/functional/jiva/k8s-snapshot-clone
# K8s-snapshot/clone test on cStor volume
cstor-k8s-snapshot-clone-creation-{snapshot-clone-cStor}:
extends: .func_test_template
script:
- ./script/apps/percona/functional/cstor/k8s-snapshot-clone-cstor
app-replica-scale-{cassandra-cstor}:
extends: .func_test_template #dependencies: cassandra-cstor
script:
......
#!/bin/bash
set -x
#################
## ENVIRONMENT ##
#################
## https://github.com/openebs/litmus/blob/master/apps/percona/functional/k8s_snapshot/test_vars.yml
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=create-k8s-snapshot-clone metadata=${run_id})
###################
## DEPENDENCIES ##
###################
${utils_path}/setup_dependencies litmus-test
## Clone the litmus repo, navigate to litmus root
git clone https://github.com/openebs/litmus.git
cd litmus
############################
## LITMUS PRECONDITIONING ##
############################
cp apps/percona/functional/k8s_snapshot/run_litmus_test.yml run_test.yml
sed -i -e 's/value: app-percona-ns/value: percona-cstor/g' \
-e 's/app: k8s-snapshot-litmus/app: cstor-k8s-snapshot-litmus/g' run_test.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_test.yml
#################
## RUNNER MAIN ##
#################
## TODO: Keep testnames & label names similar & keep keys consistent for a type of test
echo "Running the litmus test.."
${utils_path}/litmus_job_runner label='app:cstor-k8s-snapshot-litmus' job=run_test.yml
${utils_path}/task_delimiter;
echo "Dumping state of cluster post job run"; echo ""
${utils_path}/dump_cluster_state;
${utils_path}/task_delimiter;
#################
## GET RESULT ##
#################
## Check the test status & result from the litmus result custom resource
${utils_path}/get_litmus_result ${test_name}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment