Skip to content

Commit

Permalink
Fixing build failure
Browse files Browse the repository at this point in the history
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
  • Loading branch information
sbezverk committed Aug 15, 2018
1 parent 8c28ae6 commit 0b95594
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions hack/e2e-livenessprobe.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -x

## This file is for livenessprove which runs in a pair with csi
## hostpath
Expand All @@ -15,8 +15,8 @@ if [ x${TRAVIS} = x"true" ] ; then
SKIP="WithCapacity|NodeUnpublishVolume|NodePublishVolume"
fi

git clone https://github.com/kubernetes-csi/drivers ./"$APP"
pushd hostpathplugin
git clone https://github.com/kubernetes-csi/drivers $GOPATH/src/github.com/kubernetes-csi/drivers
pushd $GOPATH/src/github.com/kubernetes-csi/drivers
# Build
make hostpath; ret=$?
if [ $ret -ne 0 ]; then
Expand All @@ -28,7 +28,7 @@ popd
sudo rm -rf "$UDS" || true

# Start hostpathplugin in the background
sudo ./hostpathplugin/_output/$APP --endpoint=$CSI_ENDPOINT --nodeid=1 --v=5 &
sudo $GOPATH/src/github.com/kubernetes-csi/drivers/_output/$APP --endpoint=$CSI_ENDPOINT --nodeid=1 --v=5 &

# Start liveness probe in the background
sudo ./bin/livenessprobe --csi-address=$CSI_ENDPOINT &
Expand All @@ -37,7 +37,7 @@ sudo ./bin/livenessprobe --csi-address=$CSI_ENDPOINT &
sleep 3

# Requesting health
health=$(curl -I http://localhost:9808 | grep HTTP | awk '{print $2}'
health=$(curl -I http://localhost:9808/healthz | grep HTTP | awk '{print $2}')
if [[ "x$health" != "x200" ]]; then
echo "Health check failed, but it was not supposed to, exiting..."
exit 1
Expand All @@ -48,7 +48,7 @@ sudo kill -9 $(pidof hostpathplugin)
sleep 3

# Requesting health, should fail since hostpathplugin is gone
health=$(curl -I http://localhost:9808 | grep HTTP | awk '{print $2}'
health=$(curl -I http://localhost:9808/healthz| grep HTTP | awk '{print $2}')
if [[ "x$health" != "x500" ]]; then
echo "Health check did not detect driver failure, returned code: $health, exiting..."
exit 1
Expand Down

0 comments on commit 0b95594

Please sign in to comment.