Skip to content

Commit

Permalink
rough docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathusan Selvarajah authored Apr 10, 2019
1 parent 16e4d5d commit 6d5882f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion book/src/e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,15 @@ You would define something similar for your CSI plugin.

`SkipUnsupportedTest` simply skips any tests that you define there.

Depending on your plugin's specs, you would implement other driver interaces defined [here](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/storage/testsuites/testdriver.go#L61). For example the [NFS testdriver](https://github.com/mathu97/csi-driver-nfs/blob/master/test/nfs_driver.go) also implements PreprovisionedVolumeTestDriver, and PreprovisionedPVTestDriver, to enable pre-provisoned tests.
Depending on your plugin's specs, you would implement other driver interaces defined [here](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/storage/testsuites/testdriver.go#L61). For example the [NFS testdriver](https://github.com/mathu97/csi-driver-nfs/blob/master/test/nfs_driver.go) also implements PreprovisionedVolumeTestDriver, and PreprovisionedPVTestDriver interfaces, to enable pre-provisoned tests.

After implementing the tesdriver for your CSI plugin, you would create a `csi-volumes.go` file, where the implemented testdriver is used to run in-tree storage test suites [similar to how the NFS testdriver does](https://github.com/mathu97/csi-driver-nfs/blob/master/test/csi-volumes.go#L38).

Finally, importing the test package from your [main test file](https://github.com/mathu97/csi-driver-nfs/blob/master/cmd/nfsplugin/nfsplugin_test.go#L5) will allow all the in-tree storage tests to run.

A command similar to this would be used to run the end-to-end tests:

```
go test -v <main test file> -ginkgo.v -ginkgo.progress --kubeconfig=<kubeconfig file> -timeout=0
```

0 comments on commit 6d5882f

Please sign in to comment.