Documentation ¶
Index ¶
- Constants
- func DescribeSanity(text string, body func(*SanityContext)) bool
- func GinkgoTest(reqConfig *Config)
- func MakeCreateSnapshotReq(sc *SanityContext, name, sourceVolumeId string, parameters map[string]string) *csi.CreateSnapshotRequest
- func MakeCreateVolumeReq(sc *SanityContext, name string) *csi.CreateVolumeRequest
- func MakeDeleteSnapshotReq(sc *SanityContext, id string) *csi.DeleteSnapshotRequest
- func MakeDeleteVolumeReq(sc *SanityContext, id string) *csi.DeleteVolumeRequest
- func Test(t *testing.T, reqConfig *Config)
- func TestVolumeSize(sc *SanityContext) int64
- type CSISecrets
- type Config
- type SanityContext
Constants ¶
View Source
const ( // DefTestVolumeSize defines the base size of dynamically // provisioned volumes. 10GB by default, can be overridden by // setting Config.TestVolumeSize. DefTestVolumeSize int64 = 10 * 1024 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func DescribeSanity ¶
func DescribeSanity(text string, body func(*SanityContext)) bool
DescribeSanity must be used instead of the usual Ginkgo Describe to register a test block. The difference is that the body function will be called multiple times with the right context (when setting up a Ginkgo suite or a testing.T test, with the right configuration).
func GinkgoTest ¶
func GinkgoTest(reqConfig *Config)
func MakeCreateSnapshotReq ¶
func MakeCreateSnapshotReq(sc *SanityContext, name, sourceVolumeId string, parameters map[string]string) *csi.CreateSnapshotRequest
func MakeCreateVolumeReq ¶
func MakeCreateVolumeReq(sc *SanityContext, name string) *csi.CreateVolumeRequest
func MakeDeleteSnapshotReq ¶
func MakeDeleteSnapshotReq(sc *SanityContext, id string) *csi.DeleteSnapshotRequest
func MakeDeleteVolumeReq ¶
func MakeDeleteVolumeReq(sc *SanityContext, id string) *csi.DeleteVolumeRequest
func Test ¶
Test will test the CSI driver at the specified address by setting up a Ginkgo suite and running it.
func TestVolumeSize ¶
func TestVolumeSize(sc *SanityContext) int64
Types ¶
type CSISecrets ¶
type CSISecrets struct { CreateVolumeSecret map[string]string `yaml:"CreateVolumeSecret"` DeleteVolumeSecret map[string]string `yaml:"DeleteVolumeSecret"` ControllerPublishVolumeSecret map[string]string `yaml:"ControllerPublishVolumeSecret"` ControllerUnpublishVolumeSecret map[string]string `yaml:"ControllerUnpublishVolumeSecret"` NodeStageVolumeSecret map[string]string `yaml:"NodeStageVolumeSecret"` NodePublishVolumeSecret map[string]string `yaml:"NodePublishVolumeSecret"` CreateSnapshotSecret map[string]string `yaml:"CreateSnapshotSecret"` DeleteSnapshotSecret map[string]string `yaml:"DeleteSnapshotSecret"` }
CSISecrets consists of secrets used in CSI credentials.
type Config ¶
type Config struct { TargetPath string StagingPath string Address string SecretsFile string TestVolumeSize int64 }
Config provides the configuration for the sanity tests. It needs to be initialized by the user of the sanity package.
type SanityContext ¶
type SanityContext struct { Config *Config Conn *grpc.ClientConn Secrets *CSISecrets }
SanityContext holds the variables that each test can depend on. It gets initialized before each test block runs.
Click to show internal directories.
Click to hide internal directories.