Skip to content

Commit 974337e

Browse files
authored
Merge pull request #63 from mayankshah1607/update-sanity-workflow
CI: update GH Actions for sanity-test
2 parents bf4d6bb + 21f158d commit 974337e

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.github/workflows/sanity.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
steps:
1212
- name: Checkout code
1313
uses: actions/checkout@v2
14+
- name: Install nfs-common
15+
run: |
16+
sudo apt-get install -y nfs-common
1417
- name: Run tests
1518
run: |
1619
make sanity-test

test/sanity/params.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
server: 127.0.0.1
3+
share: /

test/sanity/run-test.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ function install_csi_sanity_bin {
3232
popd
3333
}
3434

35+
function provision_nfs_server {
36+
echo 'Installing NFS server on localhost'
37+
docker run -d --name nfs --privileged -p 2049:2049 -v $(pwd):/nfsshare -e SHARED_DIRECTORY=/nfsshare itsthenetwork/nfs-server-alpine:latest
38+
}
39+
40+
provision_nfs_server
3541
install_csi_sanity_bin
3642

3743
readonly endpoint='unix:///tmp/csi.sock'
@@ -44,4 +50,4 @@ bin/nfsplugin --endpoint "$endpoint" --nodeid "$nodeid" -v=5 &
4450

4551
echo 'Begin to run sanity test...'
4652
readonly CSI_SANITY_BIN='csi-test/cmd/csi-sanity/csi-sanity'
47-
"$CSI_SANITY_BIN" --ginkgo.v --ginkgo.noColor --csi.endpoint="$endpoint" --ginkgo.skip="ValidateVolumeCapabilities|ControllerGetCapabilities|should work"
53+
"$CSI_SANITY_BIN" --ginkgo.v --ginkgo.noColor --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|ValidateVolumeCapabilities|ControllerGetCapabilities|should work"

0 commit comments

Comments
 (0)