Commit c9c290f5 authored by sathyaseelan's avatar sathyaseelan

Included app kill script for cstor

Signed-off-by: 's avatarsathyaseelan <sathyaseelan.n@cloudbyte.com>
parent a941ce89
......@@ -186,7 +186,7 @@ volume-memory-consumption-{memcheck-jiva}:
script:
- ./script/apps/memleak/tests/jiva/memory-consumption
snapshot-clone-creation-{percona-jiva}:
k8s-snapshot-clone-creation-{percona-jiva}:
extends: .func_test_template
script:
- ./script/apps/percona/functional/jiva/k8s-snapshot-clone
......@@ -231,6 +231,11 @@ ctrl-disconnect-{postgres-jiva}:
script:
- ./script/apps/postgres/chaos/jiva/volume-controller-network-delay
app-kill-{jenkins-cstor}:
extends: .chaos_test_template #dependencies: jenkins-cstor
script:
- ./script/apps/jenkins/chaos/cstor/application-pod-failure
tgt-kill-{percona-cstor}:
extends: .chaos_test_template #dependencies: percona-cstor
script:
......
#!/bin/bash
set -x
#################
## ENVIRONMENT ##
#################
## https://github.com/openebs/litmus/blob/master/apps/percona/chaos/openebs_target_failure/test_vars.yml
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=application-pod-failure 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 ##
############################
## TODO: Add logic to replace job ENV (SC, PVC, LABEL, NS) based on run instance intent
## TODO: Add logic to add ENV for run_instance_metadata/RunID
: << EOF
----------------------------------------------------------------------------------------
| specAttribute | kind | jiva | cStor-sparse |
---------------------------------------------------------------------------------------- |
| litmusJobLabel | jobSpec | openebs-target-failure | application-pod-failure-cstor |
| appNamespace | env | app-jenkins-ns | jenkins-cstor |
| runID | env(add) | - | cstor |
----------------------------------------------------------------------------------------
EOF
cp apps/jenkins/chaos/app_pod_failure/run_litmus_test.yml run_test.yml
sed -i -e 's/name: application-pod-failure/name: application-pod-failure-cstor/g' \
-e 's/value: app-jenkins-ns/value: jenkins-cstor/g' run_test.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_test.yml
#################
## RUNNER MAIN ##
#################
echo "Running the litmus test.."
${utils_path}/litmus_job_runner label='name:application-pod-failure-cstor' 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