Merge pull request #63 from mayankshah1607/update-sanity-workflow

CI: update GH Actions for sanity-test
This commit is contained in:
Kubernetes Prow Robot 2020-10-14 02:37:54 -07:00 committed by GitHub
commit 974337e95a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 deletions

View File

@ -11,6 +11,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install nfs-common
run: |
sudo apt-get install -y nfs-common
- name: Run tests
run: |
make sanity-test

3
test/sanity/params.yaml Normal file
View File

@ -0,0 +1,3 @@
server: 127.0.0.1
share: /

View File

@ -32,6 +32,12 @@ function install_csi_sanity_bin {
popd
}
function provision_nfs_server {
echo 'Installing NFS server on localhost'
docker run -d --name nfs --privileged -p 2049:2049 -v $(pwd):/nfsshare -e SHARED_DIRECTORY=/nfsshare itsthenetwork/nfs-server-alpine:latest
}
provision_nfs_server
install_csi_sanity_bin
readonly endpoint='unix:///tmp/csi.sock'
@ -44,4 +50,4 @@ bin/nfsplugin --endpoint "$endpoint" --nodeid "$nodeid" -v=5 &
echo 'Begin to run sanity test...'
readonly CSI_SANITY_BIN='csi-test/cmd/csi-sanity/csi-sanity'
"$CSI_SANITY_BIN" --ginkgo.v --ginkgo.noColor --csi.endpoint="$endpoint" --ginkgo.skip="ValidateVolumeCapabilities|ControllerGetCapabilities|should work"
"$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"