aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2023-04-26 20:47:47 -0700
committerGitHub <noreply@github.com>2023-04-26 20:47:47 -0700
commitd777b8750bb2dd33948988f4eec8813e6207a0cd (patch)
tree557827d3ed02ea22c45c7cdccb6990cde7507f34 /test
parent3b656266b0da5457668b002ae6146b5d0976e781 (diff)
parent63378de0eda4d84ce1326afa057b2868a71306b3 (diff)
downloadseaweedfs-csi-driver-1.1.8.tar.xz
seaweedfs-csi-driver-1.1.8.zip
Merge pull request #117 from washcycle/washcycle/issue115v1.1.8v1.1.7
Validations to Pass CSI Sanity Tests and Script
Diffstat (limited to 'test')
-rw-r--r--test/sanity/params.yaml0
-rwxr-xr-xtest/test.sh29
2 files changed, 29 insertions, 0 deletions
diff --git a/test/sanity/params.yaml b/test/sanity/params.yaml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sanity/params.yaml
diff --git a/test/test.sh b/test/test.sh
new file mode 100755
index 0000000..a96d4ce
--- /dev/null
+++ b/test/test.sh
@@ -0,0 +1,29 @@
+endpoint='unix:///tmp/csi.sock'
+
+# Install csi-sanity
+cd ..
+git clone https://github.com/kubernetes-csi/csi-test.git -b v5.0.0
+cd csi-test
+make install
+
+## Start Local weed server with filer
+weed server -dir=/tmp/seaweedfs/data -s3 -volume.max=100 -volume.port=8090 -master.volumeSizeLimitMB=256
+
+## Run CSI Driver
+cd ../seaweedfs-csi-driver
+make build
+./_output/seaweedfs-csi-driver -endpoint="$endpoint" -alsologtostderr -v=5 -filer=localhost:8888 -nodeid=test
+
+# Run CSI Sanity Tests
+../csi-test/cmd/csi-sanity/csi-sanity\
+ --ginkgo.v\
+ --csi.testvolumeparameters="$(pwd)/test/sanity/params.yaml"\
+ --csi.endpoint="$endpoint"\
+ --ginkgo.skip="should not fail when requesting to create a volume with already existing name and same capacity|should fail when requesting to create a volume with already existing name and different capacity|should work|should fail when the requested volume does not exist|should return appropriate capabilities"
+
+../csi-test/cmd/csi-sanity/csi-test\
+ --ginkgo.v\
+ --csi.testvolumeparameters="$(pwd)/test/sanity/params.yaml"\
+ --csi.endpoint="$endpoint"\
+ --ginkgo.label-filter=""
+ \ No newline at end of file