Skip to content

Commit 3fdf5d9

Browse files
authored
Merge pull request kubernetes-csi#30 from lpabon/e2e-cleanup
e2e: Cleanup old files on failure
2 parents 9f60831 + f488dfb commit 3fdf5d9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

hack/e2e.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22

33
CSI_ENDPOINTS="tcp://127.0.0.1:9998"
4-
CSI_ENDPOINTS="$CSI_ENDPOINTS /tmp/csi.sock.$$"
5-
CSI_ENDPOINTS="$CSI_ENDPOINTS unix:///tmp/csi.sock.$$"
6-
CSI_ENDPOINTS="$CSI_ENDPOINTS csi.sock.$$"
4+
CSI_ENDPOINTS="$CSI_ENDPOINTS /tmp/e2e-csi-sanity.sock"
5+
CSI_ENDPOINTS="$CSI_ENDPOINTS unix:///tmp/e2e-csi-sanity.sock"
6+
CSI_ENDPOINTS="$CSI_ENDPOINTS e2e-csi-sanity.sock"
77

88
go get -u github.com/thecodeteam/gocsi/mock
99
cd cmd/csi-sanity
@@ -21,13 +21,13 @@ for endpoint in $CSI_ENDPOINTS ; do
2121
csi-sanity $@ --csi.endpoint=$endpoint ; ret=$?
2222
kill -9 $pid
2323

24-
if [ $ret -ne 0 ] ; then
25-
exit $ret
26-
fi
27-
2824
if ! echo $endpoint | grep tcp > /dev/null 2>&1 ; then
2925
rm -f $endpoint
3026
fi
27+
28+
if [ $ret -ne 0 ] ; then
29+
exit $ret
30+
fi
3131
done
3232

3333
exit 0

0 commit comments

Comments
 (0)