-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: harshita-sharma011 <[email protected]>
- Loading branch information
1 parent
9229d6d
commit a3276ec
Showing
4 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
stages/7-teaming-check/teaming-account-resource-access-check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
#!/bin/bash | ||
|
||
set -e | ||
|
||
path=$(pwd) | ||
mkdir ~/.kube | ||
cp .gcp/config ~/.kube/config | ||
|
||
echo $SDK_TOKEN > key.json | ||
gcloud auth activate-service-account --key-file=key.json | ||
gcloud config set project openebs-ci | ||
export GOOGLE_APPLICATION_CREDENTIALS="$path/key.json" | ||
|
||
bash utils/pooling jobname:teaming-invite-check | ||
bash utils/e2e-cr jobname:teaming-account-resource-access-check jobphase:Running | ||
|
||
git clone https://$username:[email protected]/mayadata-io/oep.git | ||
|
||
###################### | ||
## Running test ## | ||
###################### | ||
|
||
echo "Validate teaming role-change process --------------------------------------------" | ||
kubectl create -f oep/litmus/director/account-access/run_litmus_test.yml | ||
test_name=account-resources-check | ||
echo $test_name | ||
litmus_pod=$(kubectl get po -n litmus | grep $test_name | awk {'print $1'} | tail -n 1) | ||
echo $litmus_pod | ||
job_status=$(kubectl get po $litmus_pod -n litmus | awk {'print $3'} | tail -n 1) | ||
while [[ "$job_status" != "Completed" ]] | ||
do | ||
job_status=$(kubectl get po $litmus_pod -n litmus | awk {'print $3'} | tail -n 1) | ||
sleep 6 | ||
done | ||
kubectl logs -f $litmus_pod -n litmus | ||
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result) | ||
echo $testResult | ||
if [ "$testResult" != Pass ] | ||
then | ||
exit 1; | ||
else | ||
bash utils/e2e-cr jobname:teaming-account-resource-access-check jobphase:Completed | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ gcloud auth activate-service-account --key-file=key.json | |
gcloud config set project openebs-ci | ||
export GOOGLE_APPLICATION_CREDENTIALS="$path/key.json" | ||
|
||
bash utils/pooling jobname:teaming-invite-check | ||
bash utils/pooling jobname:teaming-account-resource-access-check | ||
bash utils/e2e-cr jobname:teaming-change-role-check jobphase:Running | ||
|
||
git clone https://$username:[email protected]/mayadata-io/oep.git | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters