Skip to content

Commit

Permalink
Add debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
hwchiu committed Aug 3, 2018
1 parent 81bc4b8 commit ca3125a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions tests/03-storage-pod/init.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ if [ -z "$podName" ]; then
export podName="test-pod-$name"
export nfsstorageName="test-nfs-storage-$name"
export volumeName="test-nfs-volume-$name"
#nfsIP=`kubectl get nodes -o jsonpath="{.items[0].status.addresses[0].address}"`
nfsIP="172.17.8.100"
nfsIP=`kubectl get nodes -o jsonpath="{.items[0].status.addresses[0].address}"`
#nfsIP="172.17.8.100"

for i in storage volume pod; do
rm -f $i.json
Expand Down
12 changes: 2 additions & 10 deletions tests/03-storage-pod/script.bats
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ load init
deploymentName="nfs-provisioner-${id}"
until kubectl -n vortex get deployment ${deploymentName} -o jsonpath="{.status.readyReplicas}" | grep "1" || [ $NEXT_WAIT_TIME -eq $WAIT_LIMIT ]; do
sleep 2
kubectl -n vortex get deployment ${deploymentName}
kubectl -n vortex describe deployment ${deploymentName}
NEXT_WAIT_TIME=$((NEXT_WAIT_TIME+ 1))
done
[ $NEXT_WAIT_TIME != $WAIT_LIMIT ]
Expand All @@ -37,7 +37,7 @@ load init
pvcName="pvc-${id}"
until kubectl get pvc ${pvcName} -o jsonpath="{.status.phase}" | grep "Bound" || [ $NEXT_WAIT_TIME -eq $WAIT_LIMIT ]; do
sleep 2
kubectl get pvc ${pvcName}
kubectl describe pvc ${pvcName}
NEXT_WAIT_TIME=$((NEXT_WAIT_TIME+ 1))
done
[ $NEXT_WAIT_TIME != $WAIT_LIMIT ]
Expand Down Expand Up @@ -73,14 +73,6 @@ load init
run bash -c 'http http://127.0.0.1:7890/v1/pods/ 2>/dev/null | jq -r ".[0].id"'
run http DELETE http://127.0.0.1:7890/v1/pods/${output} 2>/dev/null
[ $status = 0 ]
NEXT_WAIT_TIME=0
WAIT_LIMIT=100
until kubectl get pods ${podName} 2>&1 | grep "No resources" || [ $NEXT_WAIT_TIME -eq $WAIT_LIMIT ]; do
sleep 2
kubectl get pods
NEXT_WAIT_TIME=$((NEXT_WAIT_TIME+ 1))
done
[ $NEXT_WAIT_TIME != $WAIT_LIMIT ]
}

@test "Delete Volume" {
Expand Down

0 comments on commit ca3125a

Please sign in to comment.