Skip to content

Commit

Permalink
test: more robus check for driver ready
Browse files Browse the repository at this point in the history
Ensure all previous pods are gone from the api.

Signed-off-by: Tiago Castro <[email protected]>
  • Loading branch information
tiagolobocastro committed Jan 22, 2025
1 parent a52a7ce commit 7f9f3b8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ci/ci-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ cleanup() {
# shellcheck disable=SC2086
kubectl delete crds $CRDS_TO_DELETE_ON_CLEANUP
kubectl delete -f "${SNAP_CLASS}"

kubectl delete pod -lrole=openebs-zfs --force -n "$OPENEBS_NAMESPACE"
fi
fi

Expand Down Expand Up @@ -139,7 +141,8 @@ dump_logs() {
}

isPodReady(){
[ "$(kubectl get po "$1" -o 'jsonpath={.status.conditions[?(@.type=="Ready")].status}' -n "$OPENEBS_NAMESPACE")" = 'True' ]
[ "$(kubectl get po "$1" -o 'jsonpath={.status.conditions[?(@.type=="Ready")].status}' -n "$OPENEBS_NAMESPACE")" = 'True' ] &&
[ "$(kubectl get po "$1" -o 'jsonpath={.metadata.deletionTimestamp}' -n "$OPENEBS_NAMESPACE")" = "" ]
}

isDriverReady(){
Expand Down Expand Up @@ -177,7 +180,7 @@ helm_install() {

waitForZFSDriver

kubectl get po -n "$OPENEBS_NAMESPACE"
kubectl get pods -n "$OPENEBS_NAMESPACE"
}

runTestSuite() {
Expand Down

0 comments on commit 7f9f3b8

Please sign in to comment.