-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,38 +15,37 @@ | |
|
||
set -e | ||
|
||
ZFS_OPERATOR=deploy/zfs-operator.yaml | ||
ZFS_CHART=deploy/helm/charts | ||
SNAP_CLASS=deploy/sample/zfssnapclass.yaml | ||
Check warning on line 19 in ci/ci-test.sh
|
||
|
||
TEST_DIR="tests" | ||
|
||
|
||
# Prepare env for runnging BDD tests | ||
# Minikube is already running | ||
kubectl apply -f $ZFS_OPERATOR | ||
kubectl apply -f $SNAP_CLASS | ||
helm install openebs-zfslocalpv "$ZFS_CHART" -n openebs --create-namespace --dependency-update --set analytics.enabled=false | ||
|
||
dumpAgentLogs() { | ||
NR=$1 | ||
AgentPOD=$(kubectl get pods -l app=openebs-zfs-node -o jsonpath='{.items[0].metadata.name}' -n kube-system) | ||
kubectl describe po $AgentPOD -n kube-system | ||
AgentPOD=$(kubectl get pods -l app=openebs-zfs-node -o jsonpath='{.items[0].metadata.name}' -n openebs) | ||
kubectl describe po $AgentPOD -n openebs | ||
Check warning on line 31 in ci/ci-test.sh
|
||
printf "\n\n" | ||
kubectl logs --tail=${NR} $AgentPOD -n kube-system -c openebs-zfs-plugin | ||
kubectl logs --tail=${NR} $AgentPOD -n openebs -c openebs-zfs-plugin | ||
Check warning on line 33 in ci/ci-test.sh
|
||
printf "\n\n" | ||
} | ||
|
||
dumpControllerLogs() { | ||
NR=$1 | ||
ControllerPOD=$(kubectl get pods -l app=openebs-zfs-controller -o jsonpath='{.items[0].metadata.name}' -n kube-system) | ||
kubectl describe po $ControllerPOD -n kube-system | ||
ControllerPOD=$(kubectl get pods -l app=openebs-zfs-controller -o jsonpath='{.items[0].metadata.name}' -n openebs) | ||
kubectl describe po $ControllerPOD -n openebs | ||
Check warning on line 40 in ci/ci-test.sh
|
||
printf "\n\n" | ||
kubectl logs --tail=${NR} $ControllerPOD -n kube-system -c openebs-zfs-plugin | ||
kubectl logs --tail=${NR} $ControllerPOD -n openebs -c openebs-zfs-plugin | ||
Check warning on line 42 in ci/ci-test.sh
|
||
printf "\n\n" | ||
} | ||
|
||
|
||
isPodReady(){ | ||
[ "$(kubectl get po "$1" -o 'jsonpath={.status.conditions[?(@.type=="Ready")].status}' -n kube-system)" = 'True' ] | ||
[ "$(kubectl get po "$1" -o 'jsonpath={.status.conditions[?(@.type=="Ready")].status}' -n openebs)" = 'True' ] | ||
} | ||
|
||
|
||
|
@@ -63,7 +62,7 @@ waitForZFSDriver() { | |
|
||
i=0 | ||
while [ "$i" -le "$period" ]; do | ||
zfsDriver="$(kubectl get pods -l role=openebs-zfs -o 'jsonpath={.items[*].metadata.name}' -n kube-system)" | ||
zfsDriver="$(kubectl get pods -l role=openebs-zfs -o 'jsonpath={.items[*].metadata.name}' -n openebs)" | ||
if isDriverReady $zfsDriver; then | ||
Check warning on line 66 in ci/ci-test.sh
|
||
return 0 | ||
fi | ||
|
@@ -82,7 +81,7 @@ waitForZFSDriver | |
|
||
cd $TEST_DIR | ||
|
||
kubectl get po -n kube-system | ||
kubectl get po -n openebs | ||
|
||
set +e | ||
|
||
|