{"modulePath":"github.com/stackpointcloud/kubernetes","version":"v1.3.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package testing\n\n## Functions\n\n```go\nfunc FindEmptyDirectoryUsageOnTmpfs() (*resource.Quantity, error)\n```\nFindEmptyDirectoryUsageOnTmpfs finds the expected usage of an empty directory existing on a tmpfs filesystem on this system.\n\n```go\nfunc GetTestVolumePluginMgr(\n\tt *testing.T) (*VolumePluginMgr, *FakeVolumePlugin)\n```\nGetTestVolumePluginMgr creates, initializes, and returns a test volume plugin manager and fake volume plugin using a fake volume host.\n\n```go\nfunc NewFakeRecycler(pvName string, spec *Spec, host VolumeHost, config VolumeConfig) (Recycler, error)\n```\n\n```go\nfunc NewFakeVolumeHost(rootDir string, kubeClient clientset.Interface, plugins []VolumePlugin, rootContext string) *fakeVolumeHost\n```\n\n```go\nfunc ProbeVolumePlugins(config VolumeConfig) []VolumePlugin\n```\n\n```go\nfunc VerifyAttachCallCount(\n\texpectedAttachCallCount int,\n\tfakeVolumePlugin *FakeVolumePlugin) error\n```\nVerifyAttachCallCount ensures that at least one of the Attachers for this plugin has the expectedAttachCallCount number of calls. Otherwise it returns an error.\n\n```go\nfunc VerifyDetachCallCount(\n\texpectedDetachCallCount int,\n\tfakeVolumePlugin *FakeVolumePlugin) error\n```\nVerifyDetachCallCount ensures that at least one of the Attachers for this plugin has the expectedDetachCallCount number of calls. Otherwise it returns an error.\n\n```go\nfunc VerifyMountDeviceCallCount(\n\texpectedMountDeviceCallCount int,\n\tfakeVolumePlugin *FakeVolumePlugin) error\n```\nVerifyMountDeviceCallCount ensures that at least one of the Mounters for this plugin has the expectedMountDeviceCallCount number of calls. Otherwise it returns an error.\n\n```go\nfunc VerifySetUpCallCount(\n\texpectedSetUpCallCount int,\n\tfakeVolumePlugin *FakeVolumePlugin) error\n```\nVerifySetUpCallCount ensures that at least one of the Mounters for this plugin has the expectedSetUpCallCount number of calls. Otherwise it returns an error.\n\n```go\nfunc VerifyTearDownCallCount(\n\texpectedTearDownCallCount int,\n\tfakeVolumePlugin *FakeVolumePlugin) error\n```\nVerifyTearDownCallCount ensures that at least one of the Unounters for this plugin has the expectedTearDownCallCount number of calls. Otherwise it returns an error.\n\n```go\nfunc VerifyWaitForAttachCallCount(\n\texpectedWaitForAttachCallCount int,\n\tfakeVolumePlugin *FakeVolumePlugin) error\n```\nVerifyWaitForAttachCallCount ensures that at least one of the Mounters for this plugin has the expectedWaitForAttachCallCount number of calls. Otherwise it returns an error.\n\n```go\nfunc VerifyZeroAttachCalls(fakeVolumePlugin *FakeVolumePlugin) error\n```\nVerifyZeroAttachCalls ensures that all of the Attachers for this plugin have a zero AttachCallCount. Otherwise it returns an error.\n\n```go\nfunc VerifyZeroDetachCallCount(fakeVolumePlugin *FakeVolumePlugin) error\n```\nVerifyZeroDetachCallCount ensures that all Detachers for this plugin have a zero DetachCallCount. Otherwise it returns an error.\n\n```go\nfunc VerifyZeroMountDeviceCallCount(fakeVolumePlugin *FakeVolumePlugin) error\n```\nVerifyZeroMountDeviceCallCount ensures that all Attachers for this plugin have a zero MountDeviceCallCount. Otherwise it returns an error.\n\n```go\nfunc VerifyZeroSetUpCallCount(fakeVolumePlugin *FakeVolumePlugin) error\n```\nVerifyZeroSetUpCallCount ensures that all Mounters for this plugin have a zero SetUpCallCount. Otherwise it returns an error.\n\n```go\nfunc VerifyZeroTearDownCallCount(fakeVolumePlugin *FakeVolumePlugin) error\n```\nVerifyZeroTearDownCallCount ensures that all Mounters for this plugin have a zero TearDownCallCount. Otherwise it returns an error.\n\n```go\nfunc VerifyZeroWaitForAttachCallCount(fakeVolumePlugin *FakeVolumePlugin) error\n```\nVerifyZeroWaitForAttachCallCount ensures that all Attachers for this plugin have a zero WaitForAttachCallCount. Otherwise it returns an error.\n\n## Types\n\n```go\ntype FakeDeleter struct {\n\tMetricsNil\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (fd *FakeDeleter) Delete() error\n```\n\n```go\nfunc (fd *FakeDeleter) GetPath() string\n```\n\n```go\ntype FakeProvisioner struct {\n\tOptions VolumeOptions\n\tHost    VolumeHost\n}\n```\n\n```go\nfunc (fc *FakeProvisioner) Provision() (*api.PersistentVolume, error)\n```\n\n```go\ntype FakeVolume struct {\n\tsync.RWMutex\n\tPodUID  types.UID\n\tVolName string\n\tPlugin  *FakeVolumePlugin\n\tMetricsNil\n\n\tSetUpCallCount              int\n\tTearDownCallCount           int\n\tAttachCallCount             int\n\tDetachCallCount             int\n\tWaitForAttachCallCount      int\n\tWaitForDetachCallCount      int\n\tMountDeviceCallCount        int\n\tUnmountDeviceCallCount      int\n\tGetDeviceMountPathCallCount int\n}\n```\n\n```go\nfunc (fv *FakeVolume) Attach(spec *Spec, hostName string) (string, error)\n```\n\n```go\nfunc (fv *FakeVolume) Detach(deviceMountPath string, hostName string) error\n```\n\n```go\nfunc (fv *FakeVolume) GetAttachCallCount() int\n```\n\n```go\nfunc (_ *FakeVolume) GetAttributes() Attributes\n```\n\n```go\nfunc (fv *FakeVolume) GetDetachCallCount() int\n```\n\n```go\nfunc (fv *FakeVolume) GetDeviceMountPath(spec *Spec) (string, error)\n```\n\n```go\nfunc (fv *FakeVolume) GetMountDeviceCallCount() int\n```\n\n```go\nfunc (fv *FakeVolume) GetPath() string\n```\n\n```go\nfunc (fv *FakeVolume) GetSetUpCallCount() int\n```\n\n```go\nfunc (fv *FakeVolume) GetTearDownCallCount() int\n```\n\n```go\nfunc (fv *FakeVolume) GetWaitForAttachCallCount() int\n```\n\n```go\nfunc (fv *FakeVolume) MountDevice(spec *Spec, devicePath string, deviceMountPath string) error\n```\n\n```go\nfunc (fv *FakeVolume) SetUp(fsGroup *int64) error\n```\n\n```go\nfunc (fv *FakeVolume) SetUpAt(dir string, fsGroup *int64) error\n```\n\n```go\nfunc (fv *FakeVolume) TearDown() error\n```\n\n```go\nfunc (fv *FakeVolume) TearDownAt(dir string) error\n```\n\n```go\nfunc (fv *FakeVolume) UnmountDevice(globalMountPath string) error\n```\n\n```go\nfunc (fv *FakeVolume) WaitForAttach(spec *Spec, devicePath string, spectimeout time.Duration) (string, error)\n```\n\n```go\nfunc (fv *FakeVolume) WaitForDetach(devicePath string, timeout time.Duration) error\n```\n\n```go\ntype FakeVolumePlugin struct {\n\tsync.RWMutex\n\tPluginName             string\n\tHost                   VolumeHost\n\tConfig                 VolumeConfig\n\tLastProvisionerOptions VolumeOptions\n\tNewAttacherCallCount   int\n\tNewDetacherCallCount   int\n\n\tMounters   []*FakeVolume\n\tUnmounters []*FakeVolume\n\tAttachers  []*FakeVolume\n\tDetachers  []*FakeVolume\n}\n```\nFakeVolumePlugin is useful for testing.  It tries to be a fully compliant plugin, but all it does is make empty directories. Use as:\n\n\tvolume.RegisterPlugin(\u0026FakePlugin{\"fake-name\"})\n\n```go\nfunc (plugin *FakeVolumePlugin) CanSupport(spec *Spec) bool\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) GetAccessModes() []api.PersistentVolumeAccessMode\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) GetAttachers() (Attachers []*FakeVolume)\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) GetDetachers() (Detachers []*FakeVolume)\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) GetMounters() (Mounters []*FakeVolume)\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) GetNewAttacherCallCount() int\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) GetNewDetacherCallCount() int\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) GetPluginName() string\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) GetUnmounters() (Unmounters []*FakeVolume)\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) GetVolumeName(spec *Spec) (string, error)\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) Init(host VolumeHost) error\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) NewAttacher() (Attacher, error)\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) NewDeleter(spec *Spec) (Deleter, error)\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) NewDetacher() (Detacher, error)\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) NewMounter(spec *Spec, pod *api.Pod, opts VolumeOptions) (Mounter, error)\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) NewProvisioner(options VolumeOptions) (Provisioner, error)\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) NewRecycler(pvName string, spec *Spec) (Recycler, error)\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) NewUnmounter(volName string, podUID types.UID) (Unmounter, error)\n```\n\n```go\nfunc (plugin *FakeVolumePlugin) RequiresRemount() bool\n```\n\n```go\ntype MockVolume struct {\n\tmock.Mock\n}\n```\n\n```go\nfunc (_m *MockVolume) GetMetrics() (*Metrics, error)\n```\nGetMetrics provides a mock function with given fields:\n\n```go\nfunc (_m *MockVolume) GetPath() string\n```\nGetPath provides a mock function with given fields:\n\n","path":"github.com/stackpointcloud/kubernetes/pkg/volume/testing","name":"testing","synopsis":"","isRedistributable":true}
