...
 
Commits (50)
This diff is collapsed.
#!/bin/bash
set -e
path=$(pwd)
releaseTag=$RELEASE_TAG
echo $releaseTag
echo "creating packet-cluster"
sleep 300
releaseTag=$RELEASE_TAG
echo $releaseTag
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies infra-setup
#pooling over previous job to complete
echo "***********nfs-provisioning************"
bash script/utils/pooling jobname:s2-j3-policies
bash script/utils/e2e-cr jobname:s2-j4-nfs-provisioner jobphase:Waiting
bash script/utils/e2e-cr jobname:s2-j4-nfs-provisioner jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
run_id="version3";test_name=$(bash script/utils/generate_test_name testcase=nfs-provision metadata=${run_id})
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
# copy the content of deployer run_litmus_test.yml into a different file to update the test specific parameters.
cp providers/nfs-provisioner/run_litmus_test.yml nfsv3-provision.yml
sed -i -e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' \
-e 's/value: app-nfs-ns/value: app-nfsv3-ns/g' \
-e 's/value: vers=4.1/value: vers=3/g' \
-e 's/app: nfs-litmus/app: nfsv3-litmus/g' \
-e 's/value: openebs-nfs/value: openebs-nfs3/g' nfsv3-provision.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' nfsv3-provision.yml
cat nfsv3-provision.yml
bash ../script/utils/litmus_job_runner label='app:nfsv3-litmus' job=nfsv3-provision.yml
bash ../script/utils/dump_cluster_state;
cd ..
bash script/utils/event_updater jobname:s2-j4-nfs-provisioner $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
#################
## GET RESULT ##
#################
rc_val=$(echo $?)
## Check the test status & result from the litmus result custom resource
source ~/.profile
gittoken=$(echo "$github_token")
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:s2-j4-nfs-provisioner jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
if [ "$rc_val" != "0" ]; then
exit 1;
fi
\ No newline at end of file
This diff is collapsed.
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
time="date"
source ~/.profile
gittoken=$(echo "$github_token")
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
current_time=$(eval $time)
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:app-deploy-rwx jobphase:Waiting
bash script/utils/e2e-cr jobname:app-deploy-rwx jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
test_name=$(bash script/utils/generate_test_name testcase=wordpress-deployment metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
echo "Running the litmus test.."
cp apps/wordpress/deployers/run_litmus_test.yml deploy_app.yml
# Replace the storage class name
sed -i -e 's/value: openebs-nfs/value: openebs-nfs4/g' deploy_app.yml
cat deploy_app.yml
bash ../script/utils/litmus_job_runner label='app:wordpress-litmus' job=deploy_app.yml
echo "Dumping state of cluster post job run"; echo ""
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:app-deploy-rwx $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
exit 1;
fi
#################
## GET RESULT ##
#################
rc_val=$(echo $?)
source ~/.profile
gittoken=$(echo "$github_token")
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
## Check the test status & result from the litmus result custom resource
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:app-deploy-rwx jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:$testResult
# python3 script/utils/result/result_update.py $job_id WOEM 3-functional "Deploy the application using nfs-provisioner accessmode as a readwritemany" $testResult $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
\ No newline at end of file
This diff is collapsed.
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/pooling jobname:snapshot-clone
bash script/utils/e2e-cr jobname:clone-different-capacity jobphase:Waiting
bash script/utils/e2e-cr jobname:clone-different-capacity jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
################
# LitmusBook 1 #
################
run_id="different-capacity";test_name=$(bash script/utils/generate_test_name testcase=create-clone metadata=${run_id})
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/clone-creation/run_litmus_test.yml run_diff_vol_size_clone.yml
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
---------------------------------------------------------------------------------------------------------------------|
| appNamespace | env | app-busybox-ns | busybox-snap |
| appPVC | env | openebs-busybox | busybox-snapshot |
| clonePVC | env | clone-busybox | clone-different-capacity |
| volume size | env | value: 5G | value: 4G |
| Litmus job label | label | app: litmus-clone | app: clone-different-capacity |
| Litmus Job name | name | generateName: litmus-clone- | generateName: litmus-clone-different-capacity- |
----------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/value: app-busybox-ns/value: busybox-snap/g' \
-e 's/value: openebs-busybox/value: busybox-snapshot/g' \
-e 's/value: clone-busybox/value: clone-different-capacity/g' \
-e 's/value: 5G/value: 4G/g' \
-e 's/app: litmus-clone/app: clone-different-capacity/g' \
-e 's/generateName: litmus-clone-/generateName: litmus-clone-different-capacity-/g' run_diff_vol_size_clone.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_diff_vol_size_clone.yml
echo "Running the litmus test for Busybox Deployment Clone.."
cat run_diff_vol_size_clone.yml
bash ../script/utils/litmus_job_runner label='app:clone-different-capacity' job=run_diff_vol_size_clone.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:clone-different-capacity $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
# Obtain the status of the test using litmusresult(lr)
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id 6RQL 3-functional "Check if the clone can't be created with different volume capacity" $testResult $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:clone-different-capacity jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id 6RQL 3-functional "Check if the clone can't be created with different volume capacity" Pass $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
\ No newline at end of file
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/pooling jobname:clone-different-capacity
bash script/utils/e2e-cr jobname:clone-parent-volume-delete jobphase:Waiting
bash script/utils/e2e-cr jobname:clone-parent-volume-delete jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
echo "*******Taking clone of BusyBox snapshot application**********"
test_name=$(bash script/utils/generate_test_name testcase=delete-parent-volume metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/restrict-parent-volume-deletion/run_litmus_test.yml run_parent_vol_test.yml
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
---------------------------------------------------------------------------------------------------------------------|
| appPVC | env | openebs-busybox | busybox-snapshot |
| appNamespace | env | app-busybox-ns | busybox-snap |
----------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/value: openebs-busybox/value: busybox-snapshot/g' \
-e 's/value: app-busybox-ns/value: busybox-snap/g' run_parent_vol_test.yml
echo "Running the litmus test for Busybox Deployment Clone.."
cat run_parent_vol_test.yml
bash ../script/utils/litmus_job_runner label='app:litmus-delete-parent-volume' job=run_parent_vol_test.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:clone-parent-volume-delete $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
# Obtain the status of the test using litmusresult(lr)
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id 5O5V 3-functional "Check if the clone can be created using volume snapshot" $testResult $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:clone-parent-volume-delete jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id 5O5V 3-functional "Check if the clone can be created using volume snapshot" $testResult $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
\ No newline at end of file
#!/bin/bash
set -x
source ~/.profile
gittoken=$(echo "$github_token")
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:data-integrity-cstor jobphase:Waiting init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
bash script/utils/e2e-cr jobname:data-integrity-cstor jobphase:Running
test_name=$(bash script/utils/generate_test_name testcase=fio-data-integrity metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/fio/data-integrity/run_litmus_test.yml data_integrity_cstor.yml
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
---------------------------------------------------------------------------------------------------------------------|
| imagePullPolicy | image | Always | IfNotPresent |
| storgae class | env | openebs-standard | openebs-cstor-disk |
----------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' \
-e 's/value: openebs-standard/value: openebs-cstor-disk/g' data_integrity_cstor.yml
cat data_integrity_cstor.yml
bash ../script/utils/litmus_job_runner label='app:fio-di-litmus' job=data_integrity_cstor.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:data-integrity-cstor $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
# Obtain the status of the test using litmusresult(lr)
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
# Update the result of the test case in github mayadata-io/e2e-packet repository.
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id QDLO 3-functional "Ensure the data integrity in openebs volume using fio" $testResult $pipeline_id "$current_time" $commit_id $gitToken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:data-integrity-cstor jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id QDLO 3-functional "Ensure the data integrity in openebs volume using fio" $testResult $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
\ No newline at end of file
#!/bin/bash
set -x
source ~/.profile
gittoken=$(echo "$github_token")
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:data-integrity-jiva jobphase:Waiting init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
bash script/utils/e2e-cr jobname:data-integrity-jiva jobphase:Running
################
# LitmusBook 1 #
################
run_id="jiva";test_name=$(bash script/utils/generate_test_name testcase=fio-data-integrity metadata=${run_id})
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/fio/data-integrity/run_litmus_test.yml data_integrity_test_jiva.yml
: << EOF
--------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default busybox value | test specifc value |
--------------------------------------------------------------------------------------------------------------|
| imagePullPolicy | image | Always | IfNotPresent |
| LitmusjobLabel | label | app:fio-di-litmus | app:fio-di-litmus-jiva |
| storage class | env | openebs-standard | openebs-jiva-default |
| appNamespace | env | fio | fio-jiva |
--------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' \
-e 's/value: openebs-standard/value: openebs-jiva-default/g' \
-e 's/app: fio-di-litmus/app: fio-di-litmus-jiva/g' \
-e 's/value: fio/value: fio-jiva/g' data_integrity_test_jiva.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' data_integrity_test_jiva.yml
cat data_integrity_test_jiva.yml
bash ../script/utils/litmus_job_runner label='app:fio-di-litmus-jiva' job=data_integrity_test_jiva.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:data-integrity-jiva $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id UH9A 3-functional "Ensure the data integrity in openebs volume using fio" $testResult $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:data-integrity-jiva jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:$testResult
# python3 script/utils/result/result_update.py $job_id UH9A 3-functional "Ensure the data integrity in openebs volume using fio" $testResult $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:memory-consumption-jiva jobphase:Waiting init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
bash script/utils/e2e-cr jobname:memory-consumption-jiva jobphase:Running init_time:"$current_time"
################
# LitmusBook 1 #
################
test_name=$(bash script/utils/generate_test_name testcase=memleak-test metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/custom/tests/memcheck/run_litmus_test.yml memcheck_jiva.yml
: << EOF
--------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default busybox value | test specifc value |
--------------------------------------------------------------------------------------------------------------|
| storage class | env | openebs-standard | openebs-standard |
| appNamespace | env | memleak | memleak-jiva |
--------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/value: memleak/value: memleak-jiva/g' memcheck_jiva.yml
cat memcheck_jiva.yml
bash ../script/utils/litmus_job_runner label='app:memleak-test' job=memcheck_jiva.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:memory-consumption-jiva $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id SN3A 3-functional "Check if the memory consumption doesn't cross the desired threshold for known workload" Fail $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
rc_val=$(echo $?)
# testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id SN3A 3-functional "Check if the memory consumption doesn't cross the desired threshold for known workload" Fail $pipeline_id "$current_time" $commit_id $gitToken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:memory-consumption-jiva jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id SN3A 3-functional "Check if the memory consumption doesn't cross the desired threshold for known workload" Pass $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:jiva-internal-snapshot-deletion jobphase:Waiting
bash script/utils/e2e-cr jobname:jiva-internal-snapshot-deletion jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
################
# LitmusBook 1 #
################
: << EOF
--------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
------------------------------------------------------------------------------------------------------------------- |
| storage clas | env | openebs-jiva-standard | openebs-jiva-default |
| appNamespace | env | fio | fio-jiva-snapshot-del |
---------------------------------------------------------------------------------------------------------------------
EOF
test_name=$(bash script/utils/generate_test_name testcase=fio-di-delete-jiva-snapshots metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
echo "Running the litmus test for Jiva internal snapshot deletion."
cp experiments/functional/snapshot_deletion/jiva/run_litmus_test.yml jiva_snapshot_delete.yml
sed -i -e 's/value: fio/value: fio-jiva-snapshot-del/g' \
-e 's/value: openebs-jiva-standard/value: openebs-jiva-default/g' jiva_snapshot_delete.yml
cat jiva_snapshot_delete.yml
bash ../script/utils/litmus_job_runner label='app:fio-di-litmus-snap-del' job=jiva_snapshot_delete.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:jiva-internal-snapshot-deletion $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id 8QQP 3-functional "Verify if the snapshot is getting Deleted Automatically" Fail $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
This diff is collapsed.
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
gitlab_stage=3-functional # Gitlab stage where this test case is running.
source ~/.profile
#github token to push the test result into github mayadata-io/e2e-packet repository.
#This token is set as an env in ~/.profile in the test cluster.
gitToken=$github_token
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
#Creating e2e custom resource result for the test.
bash script/utils/e2e-cr jobname:jiva-openebs-ns jobphase:Waiting
bash script/utils/e2e-cr jobname:jiva-openebs-ns jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
# Runnig LitmusBook to deploy busybox and check the JIVA controller and replica pods scheduled on OpenEBS namespace.
################
# LitmusBook 1 #
################
run_id="provision";test_name=$(bash script/utils/generate_test_name testcase=jiva-pods-openebs-ns metadata=${run_id})
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
# copy the content of run_litmus_test.yml into a different file to update the test specific parameters.
cp experiments/functional/jiva-pods-openebs-ns/run_litmus_test.yml busybox_jiva_openebs.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' busybox_jiva_openebs.yml
cat busybox_jiva_openebs.yml
# Run the Litmus job and get the details of the litmus job from litmus_job_runner utils.
bash ../script/utils/litmus_job_runner label='app:litmus-jiva-openebs-ns' job=busybox_jiva_openebs.yml
cd ..
# Get the cluster state Once the litmus jobs completed.
bash script/utils/dump_cluster_state;
# Update the e2e event for the job.
bash script/utils/event_updater jobname:jiva-openebs-ns $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id $case_id 3-functional "Check if the application is successfully deployed and JIVA Controller, Replica pods are scheduled on OpenEBS namespace" $testResult $pipeline_id "$current_time" $commit_id $gitToken
exit 1;
fi
#### Deprovision BusyBox application
################
# LitmusBook 2 #
################
run_id="deprovision";test_name=$(bash script/utils/generate_test_name testcase=jiva-pods-openebs-ns metadata=${run_id})
echo $test_name
cd litmus
# copy the content of deployer run_litmus_test.yml into a different file to update the test specific parameters.
cp experiments/functional/jiva-pods-openebs-ns/run_litmus_test.yml deprovision_busybox_jiva_openebs.yml
# Update the environmental variables in litmus job spec.
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
-------------------------------------------------------------------------------------------------------------------- |
| action | env | provision | deprovision |
| Litmus job label | label | app: litmus-jiva-openebs-ns | app: deprovision-busybox-jiva-openebs |
----------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/value: provision/value: deprovision/g' \
-e 's/app: litmus-jiva-openebs-ns/app: deprovision-busybox-jiva-openebs/g' deprovision_busybox_jiva_openebs.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' deprovision_busybox_jiva_openebs.yml
cat deprovision_busybox_jiva_openebs.yml
# Run the Litmus job and get the details of the litmus job from litmus_job_runner utils.
bash ../script/utils/litmus_job_runner label='app:deprovision-busybox-jiva-openebs' job=deprovision_busybox_jiva_openebs.yml
cd ..
#Get the cluster state Once the litmus jobs completed.
bash script/utils/dump_cluster_state;
#Update the e2e event for the job
bash script/utils/event_updater jobname:jiva-openebs-ns $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
# Obtain the status of the test using litmusresult(lr)
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
# Update the result of the test case in github mayadata-io/e2e-packet repository.
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id $case_id 3-functional "Check if the application is successfully deployed and JIVA Controller, Replica pods are scheduled on OpenEBS namespace" $testResult $pipeline_id "$current_time" $commit_id $gitToken
exit 1;
fi
current_time=$(eval $time)
# Update the e2e cr once the job is completed
bash script/utils/e2e-cr jobname:jiva-openebs-ns jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:$testResult
# python3 script/utils/result/result_update.py $job_id $case_id 3-functional "Check if the application is successfully deployed and JIVA Controller, Replica pods are scheduled on OpenEBS namespace" $testResult $pipeline_id "$current_time" $commit_id $gitToken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/pooling jobname:jiva-snapshot
bash script/utils/e2e-cr jobname:jiva-snapshot-clone jobphase:Waiting
bash script/utils/e2e-cr jobname:jiva-snapshot-clone jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
echo "*******Taking clone of BusyBox snapshot application**********"
################
# LitmusBook 1 #
################
: << EOF
--------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
------------------------------------------------------------------------------------------------------------------- |
| pvcName | env | openebs-busybox | busybox-jiva-snapshot |
| Litmus job label | label | app: litmus-clone | app: litmus-jiva-clone |
| snapshot name | env | value: snapshot-busybox | value: snapshot-jiva-busybox |
| clone name | env | value: clone-busybox | value: clone-jiva-busybox |
| appNamespace | env | app-busybox-ns | busybox-jiva-snap |
---------------------------------------------------------------------------------------------------------------------
EOF
run_id="jiva";test_name=$(bash script/utils/generate_test_name testcase=create-clone metadata=${run_id})
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/clone-creation/run_litmus_test.yml run_jiva_clone_test.yml
sed -i -e 's/value: openebs-busybox/value: busybox-jiva-snapshot/g' \
-e 's/app: litmus-clone/app: litmus-jiva-clone/g' \
-e 's/value: snapshot-busybox/value: snapshot-jiva-busybox/g' \
-e 's/value: clone-busybox/value: clone-jiva-busybox/g' \
-e 's/value: app-busybox-ns/value: busybox-jiva-snap/g' run_jiva_clone_test.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_jiva_clone_test.yml
cat run_jiva_clone_test.yml
bash ../script/utils/litmus_job_runner label='app:litmus-jiva-clone' job=run_jiva_clone_test.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:jiva-snapshot-clone $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id Y4ET 3-functional "Check if the clone can be created using jiva volume snapshot" Fail $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:jiva-snapshot-clone jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id Y4ET 3-functional "Check if the clone can be created using jiva volume snapshot" Pass $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:jiva-snapshot jobphase:Waiting
bash script/utils/e2e-cr jobname:jiva-snapshot jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
bash script/utils/e2e-cr jobname:jiva-snapshot-clone jobphase:Waiting
###########Deploying Busybox Application
################
# LitmusBook 1 #
################
: << EOF
--------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
------------------------------------------------------------------------------------------------------------------- |
| Litmus job label | label | app: busybox-litmus | app: deploy-jiva-busybox-snapshot |
| Litmus Job name | name | generateName: litmus-busybox-deploy | generateName: busybox-provision-jiva-snapshot |
| appLabel | env | app=busybox-sts | app=busybox-jiva-snap |
| deploy type | env | statefulset | deployment |
| pvcName | env | openebs-busybox | busybox-jiva-snapshot |
| storage clas | env | openebs-cstor-sparse | openebs-jiva-standalone |
| appNamespace | env | app-busybox-ns | busybox-jiva-snap |
---------------------------------------------------------------------------------------------------------------------
EOF
test_name=$(bash script/utils/generate_test_name testcase=busybox-provision-busybox-jiva-snap metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
echo "Running the litmus test for Busybox Deployment.."
cp apps/busybox/deployers/run_litmus_test.yml deploy_jiva_snapshot.yml
sed -i -e 's/app: busybox-litmus/app: deploy-jiva-busybox-snapshot/g' \
-e 's/generateName: litmus-busybox-deploy/generateName: busybox-provision-jiva-snapshot/g' \
-e 's/app=busybox-sts/app=busybox-jiva-snap/g' \
-e 's/value: statefulset/value: deployment/g' \
-e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' \
-e 's/value: openebs-busybox/value: busybox-jiva-snapshot/g' \
-e 's/value: openebs-cstor-sparse/value: openebs-jiva-standalone/g' \
-e 's/value: app-busybox-ns/value: busybox-jiva-snap/g' deploy_jiva_snapshot.yml
cat deploy_jiva_snapshot.yml
bash ../script/utils/litmus_job_runner label='app:deploy-jiva-busybox-snapshot' job=deploy_jiva_snapshot.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:jiva-snapshot $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id CL2N 3-functional "Verify if the snapshot can be created for JIVA persistent volume" Fail $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
##Deploying loadgen and liveness
#################
# LitmusBook 2 #
################
run_id="jiva-snap";test_name=$(bash script/utils/generate_test_name testcase=busybox-liveness metadata=${run_id})
echo $test_name
cd litmus
# copy the content of deployer run_litmus_test.yml into a different file to update the test specific parameters.
cp apps/busybox/liveness/run_litmus_test.yml busybox_loadgen_jiva_snapshot.yml
# Update the environmental variables in litmus job spec.
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
---------------------------------------------------------------------------------------------------------------------|
| appNamespace | env | app-busybox-ns | busybox-jiva-snap |
| appLabel | env | app=busybox-sts | app=busybox-jiva-snap |
| Litmus job label | label | liveness: litmus-busybox-liveness | liveness:bb-liveness-jiva-snapshot |
----------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/value: app-busybox-ns/value: busybox-jiva-snap/g' \
-e 's/app=busybox-sts/app=busybox-jiva-snap/g' \
-e 's/liveness: litmus-busybox-liveness/liveness: bb-liveness-jiva-snapshot/g' busybox_loadgen_jiva_snapshot.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' busybox_loadgen_jiva_snapshot.yml
cat busybox_loadgen_jiva_snapshot.yml
# Run the Litmus job and get the details of the litmus job from litmus_job_runner utils.
bash ../script/utils/litmus_job_runner label='liveness:bb-liveness-jiva-snapshot' job=busybox_loadgen_jiva_snapshot.yml
cd ..
# Get the cluster state Once the litmus jobs completed.
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:jiva-snapshot $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id CL2N 3-functional "Verify if the snapshot can be created for JIVA persistent volume" Fail $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
###########Taking snapshot of BusyBox application
################
# LitmusBook 3 #
################
: << EOF
--------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
------------------------------------------------------------------------------------------------------------------- |
| Litmus job label | label | app: snapshot-litmus | app: snapshot-jiva-litmus |
| snapshot name | env | value: snapshot-busybox | value: snapshot-jiva-busybox |
| pvcName | env | openebs-busybox | busybox-jiva-snapshot |
| appNamespace | env | app-busybox-ns | busybox-jiva-snap |
---------------------------------------------------------------------------------------------------------------------
EOF
run_id="jiva";test_name=$(bash script/utils/generate_test_name testcase=create-snapshot metadata=${run_id})
echo $test_name
cd litmus
cp experiments/functional/snapshot-creation/run_litmus_test.yml run_snap_test_jiva.yml
sed -i -e 's/value: openebs-busybox/value: busybox-jiva-snapshot/g' \
-e 's/value: snapshot-busybox/value: snapshot-jiva-busybox/g' \
-e 's/app: snapshot-litmus/app: snapshot-jiva-litmus/g' \
-e 's/value: app-busybox-ns/value: busybox-jiva-snap/g' run_snap_test_jiva.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_snap_test_jiva.yml
cat run_snap_test_jiva.yml
bash ../script/utils/litmus_job_runner label='app:snapshot-jiva-litmus' job=run_snap_test_jiva.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:jiva-snapshot $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
# Obtain the status of the test using litmusresult(lr)
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id CL2N 3-functional "Verify if the snapshot can be created for JIVA persistent volume" $testResult $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:jiva-snapshot jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id CL2N 3-functional "Verify if the snapshot can be created for JIVA persistent volume" Pass $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
This diff is collapsed.
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:volume-replica-distribution jobphase:Waiting
bash script/utils/e2e-cr jobname:volume-replica-distribution jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
test_name=$(bash script/utils/generate_test_name testcase=replica-distribution metadata="")
echo $test_name
echo "*******Deploying Application and Check the statefulset storage volume distributed************"
git clone https://github.com/mayadata-io/litmus.git
cd litmus
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
---------------------------------------------------------------------------------------------------------------------|
| imagePullPolicy | image | Always | IfNotPresent |
| Litmus job label | label | app: busybox-statefulset-litmus | app: busybox-vol-distribute |
| storage class | env | openebs-cstor-sparse | openebs-cstor-disk |
| appLabel | env | app=busybox-sts | app=busybox |
| appNamespace | env | app-busybox-ns | busybox |
----------------------------------------------------------------------------------------------------------------------
EOF
echo "Running the litmus test.."
sed -i -e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' experiments/functional/sts-volume-distribution/run_litmus_test.yml
run_test=experiments/functional/sts-volume-distribution/run_litmus_test.yml
sed -i -e 's/app: busybox-statefulset-litmus/app: busybox-vol-distribute/g' \
-e 's/value: openebs-cstor-sparse/value: openebs-cstor-disk/g' \
-e 's/value: 'app=busybox-sts'/value: 'app=busybox'/g' \
-e 's/value: app-busybox-ns/value: busybox/g' $run_test
cat $run_test
bash ../script/utils/litmus_job_runner label='app:busybox-vol-distribute' job=$run_test
echo "Dumping state of cluster post job run"; echo ""
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:volume-replica-distribution $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
exit 1;
fi
#################
## GET RESULT ##
#################
rc_val=$(echo $?)
source ~/.profile
gittoken=$(echo "$github_token")
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
# python3 script/utils/result/result_update.py $test_case_id 4ZWU 3-functional "Check if the storage volume replicas are distributed across the storage pools in case of statefulset deployment" $testResult $pipeline_id "$current_time" $commit_id $gittoken
## Check the test status & result from the litmus result custom resource
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:volume-replica-distribution jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id 4ZWU 3-functional "Check if the storage volume replicas are distributed across the storage pools in case of statefulset deployment" $testResult $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/pooling jobname:snapshot
bash script/utils/e2e-cr jobname:snapshot-clone jobphase:Waiting
bash script/utils/e2e-cr jobname:snapshot-clone jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
# echo "*******Deploying Busybox Application****"
# test_name=$(bash script/utils/generate_test_name testcase=busybox-provision-snap-clone metadata="")
# echo $test_name
# cd litmus
# echo "Running the litmus test for Busybox Deployment.."
# cp apps/busybox/deployers/run_litmus_test.yml deploy_snap_clone_test.yml
# sed -i -e 's/app: busybox-litmus/app: deploy-busybox-snap-clone/g' \
# -e 's/app=busybox-sts/app=busybox-clone/g' \
# -e 's/value: statefulset/value: deployment/g' \
# -e 's/value: openebs-busybox/value: snapshot-clone/g' \
# -e 's/value: app-busybox-ns/value: snap-clone/g' deploy_snap_clone_test.yml
# cat deploy_snap_clone_test.yml
# bash ../script/utils/litmus_job_runner label='app:deploy-busybox-snap-clone' job=deploy_snap_clone_test.yml
# cd ..
# bash script/utils/dump_cluster_state;
# bash script/utils/event_updater jobname:snapshot-clone $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
# if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id ZK9B 3-functional "Check if the clone can be created using volume snapshot" Fail $pipeline_id "$current_time" $commit_id $gittoken
# exit 1;
# fi
# echo "*******Taking snapshot of BusyBox application**********"
# run_id="clone";test_name=$(bash script/utils/generate_test_name testcase=create-snapshot metadata=${run_id})
# echo $test_name
# cd litmus
# cp experiments/functional/snapshot-creation/run_litmus_test.yml run_snap_clone_test.yml
# sed -i -e 's/value: openebs-busybox/value: snapshot-clone/g' \
# -e 's/app: snapshot-litmus/app: snapshot-clone-litmus/g' \
# -e 's/value: snapshot-busybox/value: snap-clone-busybox/g' \
# -e 's/value: openebs-cstor-sparse/value: openebs-cstor-disk/g' \
# -e 's/value: app-busybox-ns/value: snap-clone/g' run_snap_clone_test.yml
# sed -i '/command:/i \
# - name: RUN_ID\
# value: '"$run_id"'\
# ' run_snap_clone_test.yml
# echo "Running the litmus test for Busybox Deployment Snapshot.."
# cat run_snap_clone_test.yml
# bash ../script/utils/litmus_job_runner label='app:snapshot-clone-litmus' job=run_snap_clone_test.yml
# cd ..
# bash script/utils/dump_cluster_state;
# bash script/utils/event_updater jobname:snapshot-clone $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
# if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id ZK9B 3-functional "Check if the clone can be created using volume snapshot" Fail $pipeline_id "$current_time" $commit_id $gittoken
# exit 1;
# fi
echo "*******Taking clone of BusyBox snapshot application**********"
test_name=$(bash script/utils/generate_test_name testcase=create-clone metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/clone-creation/run_litmus_test.yml run_clone_test.yml
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
---------------------------------------------------------------------------------------------------------------------|
| appPVC | env | openebs-busybox | busybox-snapshot |
| appNamespace | env | app-busybox-ns | busybox-snap |
----------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/value: openebs-busybox/value: busybox-snapshot/g' \
-e 's/value: app-busybox-ns/value: busybox-snap/g' run_clone_test.yml
echo "Running the litmus test for Busybox Deployment Clone.."
cat run_clone_test.yml
bash ../script/utils/litmus_job_runner label='app:litmus-clone' job=run_clone_test.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:snapshot-clone $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id ZK9B 3-functional "Check if the clone can be created using volume snapshot" Fail $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
# echo "********Deprovisioning Busybox Application*******"
# test_name=$(bash script/utils/generate_test_name testcase=busybox-deprovision-snap-clone metadata="")
# echo $test_name
# cd litmus
# cp apps/busybox/deployers/run_litmus_test.yml deprovision_clone.yml
# sed -i -e 's/generateName: litmus-busybox-deploy/generateName: busybox-deprovision-clone/g' \
# -e 's/app: busybox-litmus/app: busybox-deprovision-clone/g' \
# -e 's/value: openebs-cstor-sparse/value: openebs-cstor-disk/g' \
# -e 's/value: statefulset/value: deployment/g' \
# -e 's/app=busybox-sts/app=busybox-clone/g' \
# -e 's/value: openebs-busybox/value: snapshot-clone/g' \
# -e 's/value: app-busybox-ns/value: snap-clone/g' \
# -e 's/value: provision/value: deprovision/g' deprovision_clone.yml
# echo "Running the litmus test for Busybox Deployment Scaleup.."
# cat deprovision_clone.yml
# bash ../script/utils/litmus_job_runner label='app:busybox-deprovision-clone' job=deprovision_clone.yml
# cd ..
# bash script/utils/dump_cluster_state;
# bash script/utils/event_updater jobname:snapshot-clone $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
# rc_val=$(echo $?)
# testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
# if [ "$rc_val" != "0" ]; then
# exit 1;
# fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:snapshot-clone jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id ZK9B 3-functional "Check if the clone can be created using volume snapshot" Pass $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:snapshot jobphase:Waiting
bash script/utils/e2e-cr jobname:snapshot jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
bash script/utils/e2e-cr jobname:snapshot-clone jobphase:Waiting
bash script/utils/e2e-cr jobname:clone-different-capacity jobphase:Waiting
bash script/utils/e2e-cr jobname:clone-parent-volume-delete jobphase:Waiting
##Deploying Busybox Application
test_name=$(bash script/utils/generate_test_name testcase=busybox-provision-busybox-snap metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
echo "Running the litmus test for Busybox Deployment.."
cp apps/busybox/deployers/run_litmus_test.yml deploy_snapshot_test.yml
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
--------------------------------------------------------------------------------------------------------------------- |
| Litmus job label | label | app: busybox-litmus | app: deploy-busybox-snapshot |
| appLabel | env | app=busybox-sts | app=busybox-snap |
| deploy type | env | statefulset | deployment |
| imagePullPolicy | image | Always | IfNotPresent |
| appPVC | env | openebs-busybox | busybox-snapshot |
| storage class | env | openebs-cstor-sparse | openebs-cstor-disk |
| appNamespace | env | app-busybox-ns | busybox-snap |
----------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/app: busybox-litmus/app: deploy-busybox-snapshot/g' \
-e 's/app=busybox-sts/app=busybox-snap/g' \
-e 's/value: statefulset/value: deployment/g' \
-e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' \
-e 's/value: openebs-busybox/value: busybox-snapshot/g' \
-e 's/value: openebs-cstor-sparse/value: openebs-cstor-disk/g' \
-e 's/value: app-busybox-ns/value: busybox-snap/g' deploy_snapshot_test.yml
cat deploy_snapshot_test.yml
bash ../script/utils/litmus_job_runner label='app:deploy-busybox-snapshot' job=deploy_snapshot_test.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:snapshot $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id 9AKX 3-functional "Verify if the snapshot can be created for persistent volume" Fail $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
##Deploying loadgen and liveness
################
# LitmusBook 2 #
################
run_id="bb-snap";test_name=$(bash script/utils/generate_test_name testcase=busybox-liveness metadata=${run_id})
echo $test_name