[Ceph] Update helm tests for ceph-provisioners

The changes allow to provide more information in case of failure.

Change-Id: Ie03cafac33ef9b2cf457e0d483d838170eadaef4
This commit is contained in:
Kabanov, Dmitrii (dk370c) 2019-06-20 11:14:16 -07:00
parent eefcf33f61
commit e580e0204b

View File

@ -64,11 +64,16 @@ spec:
EOF
# waiting for pvc to get create
sleep 30
if ! kubectl get pvc -n $pvc_namespace $pvc_name|grep Bound; then
echo "Storageclass is available but can't create PersistentVolumeClaim."
exit 1
fi
end=$(($(date +%s) + 120))
while ! kubectl get pvc -n $pvc_namespace $pvc_name|grep Bound; do
if [ "$(date +%s)" -gt $end ]; then
kubectl get pvc -n $pvc_namespace $pvc_name
kubectl get pv
echo "Storageclass is available but can't create PersistentVolumeClaim."
exit 1
fi
sleep 10
done
tee <<EOF | kubectl apply --namespace $pvc_namespace -f -
---