Skip to content

Commit ab35a8a

Browse files
committed
test: refine sanity test script
1 parent 7616d68 commit ab35a8a

File tree

3 files changed

+451
-4
lines changed

3 files changed

+451
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/kubernetes-csi/csi-driver-smb
22

3-
go 1.13
3+
go 1.15
44

55
require (
66
github.com/Azure/azure-sdk-for-go v40.2.0+incompatible

test/sanity/run-test.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,19 @@ trap cleanup EXIT
2626

2727
function install_csi_sanity_bin {
2828
echo 'Installing CSI sanity test binary...'
29+
mkdir -p $GOPATH/src/github.com/kubernetes-csi
30+
pushd $GOPATH/src/github.com/kubernetes-csi
31+
export GO111MODULE=off
2932
git clone https://github.com/kubernetes-csi/csi-test.git -b v2.2.0
3033
pushd csi-test/cmd/csi-sanity
31-
make
34+
make install
35+
popd
3236
popd
3337
}
3438

35-
install_csi_sanity_bin
39+
if [[ -z "$(command -v csi-sanity)" ]]; then
40+
install_csi_sanity_bin
41+
fi
3642

3743
readonly endpoint='unix:///tmp/csi.sock'
3844
nodeid='CSINode'
@@ -43,5 +49,5 @@ fi
4349
_output/smbplugin --endpoint "$endpoint" --nodeid "$nodeid" -v=5 &
4450

4551
echo 'Begin to run sanity test...'
46-
readonly CSI_SANITY_BIN='csi-test/cmd/csi-sanity/csi-sanity'
52+
readonly CSI_SANITY_BIN='csi-sanity'
4753
"$CSI_SANITY_BIN" --ginkgo.v --ginkgo.noColor --csi.endpoint="$endpoint" --ginkgo.skip='should fail when the requested volume does not exist|should work|create a volume with already existing name and different capacity'

0 commit comments

Comments
 (0)