sanity

package
v0.2.0-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

README

CSI Driver Sanity Tester

This library provides a simple way to ensure that a CSI driver conforms to the CSI specification. There are two ways to leverage this testing framework. For CSI drivers written in Golang, the framework provides a simple API function to call to test the driver. Another way to run the test suite is to use the command line program csi-sanity.

For Golang CSI Drivers

This framework leverages the Ginkgo BDD testing framework to deliver a descriptive test suite for your driver. To test your driver, simply call the API in one of your Golang TestXXX functions. For example:

func TestMyDriver(t *testing.T) {
    // Setup the full driver and its environment
    ... setup driver ...

    // Now call the test suite
    sanity.Test(t, driverEndpointAddress, "/mnt")
}

Command line program

Please see csi-sanity

Documentation

Index

Constants

View Source
const (
	TestVolumeSize = 10 * 1024 * 1024 * 1024
)

Variables

This section is empty.

Functions

func Test

func Test(t *testing.T, reqConfig *Config)

Test will test the CSI driver at the specified address

Types

type Config

type Config struct {
	TargetPath  string
	StagingPath string
	Address     string
}

Config provides the configuration for the sanity tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL