Unit Testing
The CSI sanity
package from csi-test can be used for unit testing your CSI driver.
It contains a set of basic tests that all CSI drivers should pass (for example, NodePublishVolume should fail when no volume id is provided
, etc.).
This package can be used in two modes:
- Via a Golang test framework (
sanity
package is imported as a dependency) - Via a command line against your driver binary.
Read the documentation of the sanity
package for more details.