kubernetes: k8s.io/kubernetes/pkg/volume/testing Index | Files

package testing

import "k8s.io/kubernetes/pkg/volume/testing"

Index

Package Files

mock_volume.go testing.go

Constants

const (
    // A hook specified in storage class to indicate it's provisioning
    // is expected to fail.
    ExpectProvisionFailureKey = "expect-provision-failure"
    // The node is marked as uncertain. The attach operation will fail and return timeout error
    // for the first attach call. The following call will return sucesssfully.
    UncertainAttachNode = "uncertain-attach-node"
    // The node is marked as timeout. The attach operation will always fail and return timeout error
    // but the operation is actually succeeded.
    TimeoutAttachNode = "timeout-attach-node"
    // The node is marked as multi-attach which means it is allowed to attach the volume to multiple nodes.
    MultiAttachNode = "multi-attach-node"
)

func ContainsAccessMode Uses

func ContainsAccessMode(modes []v1.PersistentVolumeAccessMode, mode v1.PersistentVolumeAccessMode) bool

func CreateTestPVC Uses

func CreateTestPVC(capacity string, accessModes []v1.PersistentVolumeAccessMode) *v1.PersistentVolumeClaim

CreateTestPVC returns a provisionable PVC for tests

func FindEmptyDirectoryUsageOnTmpfs Uses

func FindEmptyDirectoryUsageOnTmpfs() (*resource.Quantity, error)

FindEmptyDirectoryUsageOnTmpfs finds the expected usage of an empty directory existing on a tmpfs filesystem on this system.

func GetTestVolumePluginMgr Uses

func GetTestVolumePluginMgr(
    t *testing.T) (*VolumePluginMgr, *FakeVolumePlugin)

GetTestVolumePluginMgr creates, initializes, and returns a test volume plugin manager and fake volume plugin using a fake volume host.

func MetricsEqualIgnoreTimestamp Uses

func MetricsEqualIgnoreTimestamp(a *Metrics, b *Metrics) bool

func NewBlockVolumePathHandler Uses

func NewBlockVolumePathHandler() volumepathhandler.BlockVolumePathHandler

NewDeviceHandler Create a new IoHandler implementation

func NewFakeFileVolumePlugin Uses

func NewFakeFileVolumePlugin() []VolumePlugin

func NewFakeVolumeHost Uses

func NewFakeVolumeHost(rootDir string, kubeClient clientset.Interface, plugins []VolumePlugin) *fakeVolumeHost

func NewFakeVolumeHostWithCSINodeName Uses

func NewFakeVolumeHostWithCSINodeName(rootDir string, kubeClient clientset.Interface, plugins []VolumePlugin, nodeName string, driverLister storagelisters.CSIDriverLister) *fakeVolumeHost

func NewFakeVolumeHostWithCloudProvider Uses

func NewFakeVolumeHostWithCloudProvider(rootDir string, kubeClient clientset.Interface, plugins []VolumePlugin, cloud cloudprovider.Interface) *fakeVolumeHost

func NewFakeVolumeHostWithMounterFSType Uses

func NewFakeVolumeHostWithMounterFSType(rootDir string, kubeClient clientset.Interface, plugins []VolumePlugin, pathToTypeMap map[string]mount.FileType) *fakeVolumeHost

func NewFakeVolumeHostWithNodeLabels Uses

func NewFakeVolumeHostWithNodeLabels(rootDir string, kubeClient clientset.Interface, plugins []VolumePlugin, labels map[string]string) *fakeVolumeHost

func ProbeVolumePlugins Uses

func ProbeVolumePlugins(config VolumeConfig) []VolumePlugin

func VerifyAttachCallCount Uses

func VerifyAttachCallCount(
    expectedAttachCallCount int,
    fakeVolumePlugin *FakeVolumePlugin) error

VerifyAttachCallCount ensures that at least one of the Attachers for this plugin has the expectedAttachCallCount number of calls. Otherwise it returns an error.

func VerifyDetachCallCount Uses

func VerifyDetachCallCount(
    expectedDetachCallCount int,
    fakeVolumePlugin *FakeVolumePlugin) error

VerifyDetachCallCount ensures that at least one of the Attachers for this plugin has the expectedDetachCallCount number of calls. Otherwise it returns an error.

func VerifyGetGlobalMapPathCallCount Uses

func VerifyGetGlobalMapPathCallCount(
    expectedGlobalMapPathCallCount int,
    fakeVolumePlugin *FakeVolumePlugin) error

VerifyGetGlobalMapPathCallCount ensures that at least one of the Mappers for this plugin has the expectedGlobalMapPathCallCount number of calls. Otherwise it returns an error.

func VerifyGetMapDeviceCallCount Uses

func VerifyGetMapDeviceCallCount(
    expectedMapDeviceCallCount int,
    fakeVolumePlugin *FakeVolumePlugin) error

VerifyGetMapDeviceCallCount ensures that at least one of the Mappers for this plugin has the expectedMapDeviceCallCount number of calls. Otherwise it returns an error.

func VerifyGetPodDeviceMapPathCallCount Uses

func VerifyGetPodDeviceMapPathCallCount(
    expectedPodDeviceMapPathCallCount int,
    fakeVolumePlugin *FakeVolumePlugin) error

VerifyGetPodDeviceMapPathCallCount ensures that at least one of the Mappers for this plugin has the expectedPodDeviceMapPathCallCount number of calls. Otherwise it returns an error.

func VerifyMountDeviceCallCount Uses

func VerifyMountDeviceCallCount(
    expectedMountDeviceCallCount int,
    fakeVolumePlugin *FakeVolumePlugin) error

VerifyMountDeviceCallCount ensures that at least one of the Mounters for this plugin has the expectedMountDeviceCallCount number of calls. Otherwise it returns an error.

func VerifySetUpCallCount Uses

func VerifySetUpCallCount(
    expectedSetUpCallCount int,
    fakeVolumePlugin *FakeVolumePlugin) error

VerifySetUpCallCount ensures that at least one of the Mounters for this plugin has the expectedSetUpCallCount number of calls. Otherwise it returns an error.

func VerifySetUpDeviceCallCount Uses

func VerifySetUpDeviceCallCount(
    expectedSetUpDeviceCallCount int,
    fakeVolumePlugin *FakeVolumePlugin) error

VerifySetUpDeviceCallCount ensures that at least one of the Mappers for this plugin has the expectedSetUpDeviceCallCount number of calls. Otherwise it returns an error.

func VerifyTearDownCallCount Uses

func VerifyTearDownCallCount(
    expectedTearDownCallCount int,
    fakeVolumePlugin *FakeVolumePlugin) error

VerifyTearDownCallCount ensures that at least one of the Unounters for this plugin has the expectedTearDownCallCount number of calls. Otherwise it returns an error.

func VerifyTearDownDeviceCallCount Uses

func VerifyTearDownDeviceCallCount(
    expectedTearDownDeviceCallCount int,
    fakeVolumePlugin *FakeVolumePlugin) error

VerifyTearDownDeviceCallCount ensures that at least one of the Unmappers for this plugin has the expectedTearDownDeviceCallCount number of calls. Otherwise it returns an error.

func VerifyWaitForAttachCallCount Uses

func VerifyWaitForAttachCallCount(
    expectedWaitForAttachCallCount int,
    fakeVolumePlugin *FakeVolumePlugin) error

VerifyWaitForAttachCallCount ensures that at least one of the Mounters for this plugin has the expectedWaitForAttachCallCount number of calls. Otherwise it returns an error.

func VerifyZeroAttachCalls Uses

func VerifyZeroAttachCalls(fakeVolumePlugin *FakeVolumePlugin) error

VerifyZeroAttachCalls ensures that all of the Attachers for this plugin have a zero AttachCallCount. Otherwise it returns an error.

func VerifyZeroDetachCallCount Uses

func VerifyZeroDetachCallCount(fakeVolumePlugin *FakeVolumePlugin) error

VerifyZeroDetachCallCount ensures that all Detachers for this plugin have a zero DetachCallCount. Otherwise it returns an error.

func VerifyZeroMountDeviceCallCount Uses

func VerifyZeroMountDeviceCallCount(fakeVolumePlugin *FakeVolumePlugin) error

VerifyZeroMountDeviceCallCount ensures that all Attachers for this plugin have a zero MountDeviceCallCount. Otherwise it returns an error.

func VerifyZeroSetUpCallCount Uses

func VerifyZeroSetUpCallCount(fakeVolumePlugin *FakeVolumePlugin) error

VerifyZeroSetUpCallCount ensures that all Mounters for this plugin have a zero SetUpCallCount. Otherwise it returns an error.

func VerifyZeroTearDownCallCount Uses

func VerifyZeroTearDownCallCount(fakeVolumePlugin *FakeVolumePlugin) error

VerifyZeroTearDownCallCount ensures that all Mounters for this plugin have a zero TearDownCallCount. Otherwise it returns an error.

func VerifyZeroTearDownDeviceCallCount Uses

func VerifyZeroTearDownDeviceCallCount(fakeVolumePlugin *FakeVolumePlugin) error

VerifyZeroTearDownDeviceCallCount ensures that all Mappers for this plugin have a zero TearDownDeviceCallCount. Otherwise it returns an error.

func VerifyZeroWaitForAttachCallCount Uses

func VerifyZeroWaitForAttachCallCount(fakeVolumePlugin *FakeVolumePlugin) error

VerifyZeroWaitForAttachCallCount ensures that all Attachers for this plugin have a zero WaitForAttachCallCount. Otherwise it returns an error.

type FakeAttachableVolumePlugin Uses

type FakeAttachableVolumePlugin struct {
    FakeDeviceMountableVolumePlugin
}

FakeAttachableVolumePlugin implements an attachable plugin based on FakeDeviceMountableVolumePlugin.

func (*FakeAttachableVolumePlugin) CanAttach Uses

func (f *FakeAttachableVolumePlugin) CanAttach(spec *Spec) (bool, error)

func (*FakeAttachableVolumePlugin) NewAttacher Uses

func (f *FakeAttachableVolumePlugin) NewAttacher() (Attacher, error)

func (*FakeAttachableVolumePlugin) NewDetacher Uses

func (f *FakeAttachableVolumePlugin) NewDetacher() (Detacher, error)

type FakeBasicVolumePlugin Uses

type FakeBasicVolumePlugin struct {
    Plugin FakeVolumePlugin
}

FakeBasicVolumePlugin implements a basic volume plugin. It wrappers on FakeVolumePlugin but implements VolumePlugin interface only. It is useful to test logic involving plugin interfaces.

func (*FakeBasicVolumePlugin) CanSupport Uses

func (f *FakeBasicVolumePlugin) CanSupport(spec *Spec) bool

CanSupport tests whether the plugin supports a given volume specification by testing volume spec name begins with plugin name or not. This is useful to choose plugin by volume in testing.

func (*FakeBasicVolumePlugin) ConstructVolumeSpec Uses

func (f *FakeBasicVolumePlugin) ConstructVolumeSpec(ame, mountPath string) (*Spec, error)

func (*FakeBasicVolumePlugin) GetPluginName Uses

func (f *FakeBasicVolumePlugin) GetPluginName() string

func (*FakeBasicVolumePlugin) GetVolumeName Uses

func (f *FakeBasicVolumePlugin) GetVolumeName(spec *Spec) (string, error)

func (*FakeBasicVolumePlugin) Init Uses

func (f *FakeBasicVolumePlugin) Init(ost VolumeHost) error

func (*FakeBasicVolumePlugin) IsMigratedToCSI Uses

func (plugin *FakeBasicVolumePlugin) IsMigratedToCSI() bool

func (*FakeBasicVolumePlugin) NewMounter Uses

func (f *FakeBasicVolumePlugin) NewMounter(spec *Spec, pod *v1.Pod, opts VolumeOptions) (Mounter, error)

func (*FakeBasicVolumePlugin) NewUnmounter Uses

func (f *FakeBasicVolumePlugin) NewUnmounter(volName string, podUID types.UID) (Unmounter, error)

func (*FakeBasicVolumePlugin) RequiresRemount Uses

func (f *FakeBasicVolumePlugin) RequiresRemount() bool

func (*FakeBasicVolumePlugin) SupportsBulkVolumeVerification Uses

func (f *FakeBasicVolumePlugin) SupportsBulkVolumeVerification() bool

func (*FakeBasicVolumePlugin) SupportsMountOption Uses

func (f *FakeBasicVolumePlugin) SupportsMountOption() bool

type FakeDeleter Uses

type FakeDeleter struct {
    MetricsNil
    // contains filtered or unexported fields
}

func (*FakeDeleter) Delete Uses

func (fd *FakeDeleter) Delete() error

func (*FakeDeleter) GetPath Uses

func (fd *FakeDeleter) GetPath() string

type FakeDeviceMountableVolumePlugin Uses

type FakeDeviceMountableVolumePlugin struct {
    FakeBasicVolumePlugin
}

FakeDeviceMountableVolumePlugin implements an device mountable plugin based on FakeBasicVolumePlugin.

func (*FakeDeviceMountableVolumePlugin) CanDeviceMount Uses

func (f *FakeDeviceMountableVolumePlugin) CanDeviceMount(spec *Spec) (bool, error)

func (*FakeDeviceMountableVolumePlugin) GetDeviceMountRefs Uses

func (f *FakeDeviceMountableVolumePlugin) GetDeviceMountRefs(deviceMountPath string) ([]string, error)

func (*FakeDeviceMountableVolumePlugin) NewDeviceMounter Uses

func (f *FakeDeviceMountableVolumePlugin) NewDeviceMounter() (DeviceMounter, error)

func (*FakeDeviceMountableVolumePlugin) NewDeviceUnmounter Uses

func (f *FakeDeviceMountableVolumePlugin) NewDeviceUnmounter() (DeviceUnmounter, error)

type FakeFileVolumePlugin Uses

type FakeFileVolumePlugin struct {
}

func (*FakeFileVolumePlugin) CanSupport Uses

func (plugin *FakeFileVolumePlugin) CanSupport(spec *Spec) bool

func (*FakeFileVolumePlugin) ConstructVolumeSpec Uses

func (plugin *FakeFileVolumePlugin) ConstructVolumeSpec(volumeName, mountPath string) (*Spec, error)

func (*FakeFileVolumePlugin) GetPluginName Uses

func (plugin *FakeFileVolumePlugin) GetPluginName() string

func (*FakeFileVolumePlugin) GetVolumeName Uses

func (plugin *FakeFileVolumePlugin) GetVolumeName(spec *Spec) (string, error)

func (*FakeFileVolumePlugin) Init Uses

func (plugin *FakeFileVolumePlugin) Init(host VolumeHost) error

func (*FakeFileVolumePlugin) IsMigratedToCSI Uses

func (plugin *FakeFileVolumePlugin) IsMigratedToCSI() bool

func (*FakeFileVolumePlugin) NewMounter Uses

func (plugin *FakeFileVolumePlugin) NewMounter(spec *Spec, podRef *v1.Pod, opts VolumeOptions) (Mounter, error)

func (*FakeFileVolumePlugin) NewUnmounter Uses

func (plugin *FakeFileVolumePlugin) NewUnmounter(name string, podUID types.UID) (Unmounter, error)

func (*FakeFileVolumePlugin) RequiresRemount Uses

func (plugin *FakeFileVolumePlugin) RequiresRemount() bool

func (*FakeFileVolumePlugin) SupportsBulkVolumeVerification Uses

func (plugin *FakeFileVolumePlugin) SupportsBulkVolumeVerification() bool

func (*FakeFileVolumePlugin) SupportsMountOption Uses

func (plugin *FakeFileVolumePlugin) SupportsMountOption() bool

type FakeProvisioner Uses

type FakeProvisioner struct {
    Options               VolumeOptions
    Host                  VolumeHost
    ProvisionDelaySeconds int
}

func (*FakeProvisioner) Provision Uses

func (fc *FakeProvisioner) Provision(selectedNode *v1.Node, allowedTopologies []v1.TopologySelectorTerm) (*v1.PersistentVolume, error)

type FakeVolume Uses

type FakeVolume struct {
    sync.RWMutex
    PodUID  types.UID
    VolName string
    Plugin  *FakeVolumePlugin
    MetricsNil
    VolumesAttached map[string]types.NodeName

    // Add callbacks as needed
    WaitForAttachHook func(spec *Spec, devicePath string, pod *v1.Pod, spectimeout time.Duration) (string, error)
    UnmountDeviceHook func(globalMountPath string) error

    SetUpCallCount              int
    TearDownCallCount           int
    AttachCallCount             int
    DetachCallCount             int
    WaitForAttachCallCount      int
    MountDeviceCallCount        int
    UnmountDeviceCallCount      int
    GetDeviceMountPathCallCount int
    SetUpDeviceCallCount        int
    TearDownDeviceCallCount     int
    MapDeviceCallCount          int
    GlobalMapPathCallCount      int
    PodDeviceMapPathCallCount   int
}

func (*FakeVolume) Attach Uses

func (fv *FakeVolume) Attach(spec *Spec, nodeName types.NodeName) (string, error)

func (*FakeVolume) CanMount Uses

func (fv *FakeVolume) CanMount() error

func (*FakeVolume) Detach Uses

func (fv *FakeVolume) Detach(volumeName string, nodeName types.NodeName) error

func (*FakeVolume) GetAttachCallCount Uses

func (fv *FakeVolume) GetAttachCallCount() int

func (*FakeVolume) GetAttributes Uses

func (_ *FakeVolume) GetAttributes() Attributes

func (*FakeVolume) GetDetachCallCount Uses

func (fv *FakeVolume) GetDetachCallCount() int

func (*FakeVolume) GetDeviceMountPath Uses

func (fv *FakeVolume) GetDeviceMountPath(spec *Spec) (string, error)

func (*FakeVolume) GetGlobalMapPath Uses

func (fv *FakeVolume) GetGlobalMapPath(spec *Spec) (string, error)

Block volume support

func (*FakeVolume) GetGlobalMapPathCallCount Uses

func (fv *FakeVolume) GetGlobalMapPathCallCount() int

Block volume support

func (*FakeVolume) GetMapDeviceCallCount Uses

func (fv *FakeVolume) GetMapDeviceCallCount() int

Block volume support

func (*FakeVolume) GetMountDeviceCallCount Uses

func (fv *FakeVolume) GetMountDeviceCallCount() int

func (*FakeVolume) GetPath Uses

func (fv *FakeVolume) GetPath() string

func (*FakeVolume) GetPodDeviceMapPath Uses

func (fv *FakeVolume) GetPodDeviceMapPath() (string, string)

Block volume support

func (*FakeVolume) GetPodDeviceMapPathCallCount Uses

func (fv *FakeVolume) GetPodDeviceMapPathCallCount() int

Block volume support

func (*FakeVolume) GetSetUpCallCount Uses

func (fv *FakeVolume) GetSetUpCallCount() int

func (*FakeVolume) GetSetUpDeviceCallCount Uses

func (fv *FakeVolume) GetSetUpDeviceCallCount() int

Block volume support

func (*FakeVolume) GetTearDownCallCount Uses

func (fv *FakeVolume) GetTearDownCallCount() int

func (*FakeVolume) GetTearDownDeviceCallCount Uses

func (fv *FakeVolume) GetTearDownDeviceCallCount() int

Block volume support

func (*FakeVolume) GetWaitForAttachCallCount Uses

func (fv *FakeVolume) GetWaitForAttachCallCount() int

func (*FakeVolume) MapDevice Uses

func (fv *FakeVolume) MapDevice(devicePath, globalMapPath, volumeMapPath, volumeMapName string, pod types.UID) error

Block volume support

func (*FakeVolume) MountDevice Uses

func (fv *FakeVolume) MountDevice(spec *Spec, devicePath string, deviceMountPath string) error

func (*FakeVolume) SetUp Uses

func (fv *FakeVolume) SetUp(mounterArgs MounterArgs) error

func (*FakeVolume) SetUpAt Uses

func (fv *FakeVolume) SetUpAt(dir string, mounterArgs MounterArgs) error

func (*FakeVolume) SetUpDevice Uses

func (fv *FakeVolume) SetUpDevice() (string, error)

Block volume support

func (*FakeVolume) TearDown Uses

func (fv *FakeVolume) TearDown() error

func (*FakeVolume) TearDownAt Uses

func (fv *FakeVolume) TearDownAt(dir string) error

func (*FakeVolume) TearDownDevice Uses

func (fv *FakeVolume) TearDownDevice(mapPath string, devicePath string) error

Block volume support

func (*FakeVolume) UnmountDevice Uses

func (fv *FakeVolume) UnmountDevice(globalMountPath string) error

func (*FakeVolume) VolumesAreAttached Uses

func (fv *FakeVolume) VolumesAreAttached(spec []*Spec, nodeName types.NodeName) (map[*Spec]bool, error)

func (*FakeVolume) WaitForAttach Uses

func (fv *FakeVolume) WaitForAttach(spec *Spec, devicePath string, pod *v1.Pod, spectimeout time.Duration) (string, error)

type FakeVolumePathHandler Uses

type FakeVolumePathHandler struct {
    sync.RWMutex
}

func (*FakeVolumePathHandler) AttachFileDevice Uses

func (fv *FakeVolumePathHandler) AttachFileDevice(path string) (string, error)

func (*FakeVolumePathHandler) FindGlobalMapPathUUIDFromPod Uses

func (fv *FakeVolumePathHandler) FindGlobalMapPathUUIDFromPod(pluginDir, mapPath string, podUID types.UID) (string, error)

func (*FakeVolumePathHandler) GetDeviceSymlinkRefs Uses

func (fv *FakeVolumePathHandler) GetDeviceSymlinkRefs(devPath string, mapPath string) ([]string, error)

func (*FakeVolumePathHandler) GetLoopDevice Uses

func (fv *FakeVolumePathHandler) GetLoopDevice(path string) (string, error)

func (*FakeVolumePathHandler) IsSymlinkExist Uses

func (fv *FakeVolumePathHandler) IsSymlinkExist(mapPath string) (bool, error)

func (*FakeVolumePathHandler) MapDevice Uses

func (fv *FakeVolumePathHandler) MapDevice(devicePath string, mapDir string, linkName string) error

func (*FakeVolumePathHandler) RemoveLoopDevice Uses

func (fv *FakeVolumePathHandler) RemoveLoopDevice(device string) error

func (*FakeVolumePathHandler) RemoveMapPath Uses

func (fv *FakeVolumePathHandler) RemoveMapPath(mapPath string) error

func (*FakeVolumePathHandler) UnmapDevice Uses

func (fv *FakeVolumePathHandler) UnmapDevice(mapDir string, linkName string) error

type FakeVolumePlugin Uses

type FakeVolumePlugin struct {
    sync.RWMutex
    PluginName             string
    Host                   VolumeHost
    Config                 VolumeConfig
    LastProvisionerOptions VolumeOptions
    NewAttacherCallCount   int
    NewDetacherCallCount   int
    VolumeLimits           map[string]int64
    VolumeLimitsError      error
    LimitKey               string
    ProvisionDelaySeconds  int

    // Add callbacks as needed
    WaitForAttachHook func(spec *Spec, devicePath string, pod *v1.Pod, spectimeout time.Duration) (string, error)
    UnmountDeviceHook func(globalMountPath string) error

    Mounters             []*FakeVolume
    Unmounters           []*FakeVolume
    Attachers            []*FakeVolume
    Detachers            []*FakeVolume
    BlockVolumeMappers   []*FakeVolume
    BlockVolumeUnmappers []*FakeVolume
}

FakeVolumePlugin is useful for testing. It tries to be a fully compliant plugin, but all it does is make empty directories. Use as:

volume.RegisterPlugin(&FakePlugin{"fake-name"})

func (*FakeVolumePlugin) CanAttach Uses

func (plugin *FakeVolumePlugin) CanAttach(spec *Spec) (bool, error)

func (*FakeVolumePlugin) CanDeviceMount Uses

func (plugin *FakeVolumePlugin) CanDeviceMount(spec *Spec) (bool, error)

func (*FakeVolumePlugin) CanSupport Uses

func (plugin *FakeVolumePlugin) CanSupport(spec *Spec) bool

func (*FakeVolumePlugin) ConstructBlockVolumeSpec Uses

func (plugin *FakeVolumePlugin) ConstructBlockVolumeSpec(podUID types.UID, volumeName, mountPath string) (*Spec, error)

Block volume support

func (*FakeVolumePlugin) ConstructVolumeSpec Uses

func (plugin *FakeVolumePlugin) ConstructVolumeSpec(volumeName, mountPath string) (*Spec, error)

func (*FakeVolumePlugin) ExpandVolumeDevice Uses

func (plugin *FakeVolumePlugin) ExpandVolumeDevice(spec *Spec, newSize resource.Quantity, oldSize resource.Quantity) (resource.Quantity, error)

Expandable volume support

func (*FakeVolumePlugin) GetAccessModes Uses

func (plugin *FakeVolumePlugin) GetAccessModes() []v1.PersistentVolumeAccessMode

func (*FakeVolumePlugin) GetAttachers Uses

func (plugin *FakeVolumePlugin) GetAttachers() (Attachers []*FakeVolume)

func (*FakeVolumePlugin) GetBlockVolumeMapper Uses

func (plugin *FakeVolumePlugin) GetBlockVolumeMapper() (BlockVolumeMappers []*FakeVolume)

Block volume support

func (*FakeVolumePlugin) GetBlockVolumeUnmapper Uses

func (plugin *FakeVolumePlugin) GetBlockVolumeUnmapper() (BlockVolumeUnmappers []*FakeVolume)

Block volume support

func (*FakeVolumePlugin) GetDetachers Uses

func (plugin *FakeVolumePlugin) GetDetachers() (Detachers []*FakeVolume)

func (*FakeVolumePlugin) GetDeviceMountRefs Uses

func (plugin *FakeVolumePlugin) GetDeviceMountRefs(deviceMountPath string) ([]string, error)

func (*FakeVolumePlugin) GetMounters Uses

func (plugin *FakeVolumePlugin) GetMounters() (Mounters []*FakeVolume)

func (*FakeVolumePlugin) GetNewAttacherCallCount Uses

func (plugin *FakeVolumePlugin) GetNewAttacherCallCount() int

func (*FakeVolumePlugin) GetNewDetacherCallCount Uses

func (plugin *FakeVolumePlugin) GetNewDetacherCallCount() int

func (*FakeVolumePlugin) GetPluginName Uses

func (plugin *FakeVolumePlugin) GetPluginName() string

func (*FakeVolumePlugin) GetUnmounters Uses

func (plugin *FakeVolumePlugin) GetUnmounters() (Unmounters []*FakeVolume)

func (*FakeVolumePlugin) GetVolumeLimits Uses

func (plugin *FakeVolumePlugin) GetVolumeLimits() (map[string]int64, error)

func (*FakeVolumePlugin) GetVolumeName Uses

func (plugin *FakeVolumePlugin) GetVolumeName(spec *Spec) (string, error)

func (*FakeVolumePlugin) Init Uses

func (plugin *FakeVolumePlugin) Init(host VolumeHost) error

func (*FakeVolumePlugin) IsMigratedToCSI Uses

func (plugin *FakeVolumePlugin) IsMigratedToCSI() bool

func (*FakeVolumePlugin) NewAttacher Uses

func (plugin *FakeVolumePlugin) NewAttacher() (Attacher, error)

func (*FakeVolumePlugin) NewBlockVolumeMapper Uses

func (plugin *FakeVolumePlugin) NewBlockVolumeMapper(spec *Spec, pod *v1.Pod, opts VolumeOptions) (BlockVolumeMapper, error)

Block volume support

func (*FakeVolumePlugin) NewBlockVolumeUnmapper Uses

func (plugin *FakeVolumePlugin) NewBlockVolumeUnmapper(volName string, podUID types.UID) (BlockVolumeUnmapper, error)

Block volume support

func (*FakeVolumePlugin) NewDeleter Uses

func (plugin *FakeVolumePlugin) NewDeleter(spec *Spec) (Deleter, error)

func (*FakeVolumePlugin) NewDetacher Uses

func (plugin *FakeVolumePlugin) NewDetacher() (Detacher, error)

func (*FakeVolumePlugin) NewDeviceMounter Uses

func (plugin *FakeVolumePlugin) NewDeviceMounter() (DeviceMounter, error)

func (*FakeVolumePlugin) NewDeviceUnmounter Uses

func (plugin *FakeVolumePlugin) NewDeviceUnmounter() (DeviceUnmounter, error)

func (*FakeVolumePlugin) NewMounter Uses

func (plugin *FakeVolumePlugin) NewMounter(spec *Spec, pod *v1.Pod, opts VolumeOptions) (Mounter, error)

func (*FakeVolumePlugin) NewProvisioner Uses

func (plugin *FakeVolumePlugin) NewProvisioner(options VolumeOptions) (Provisioner, error)

func (*FakeVolumePlugin) NewUnmounter Uses

func (plugin *FakeVolumePlugin) NewUnmounter(volName string, podUID types.UID) (Unmounter, error)

func (*FakeVolumePlugin) NodeExpand Uses

func (plugin *FakeVolumePlugin) NodeExpand(resizeOptions NodeResizeOptions) (bool, error)

func (*FakeVolumePlugin) Recycle Uses

func (plugin *FakeVolumePlugin) Recycle(pvName string, spec *Spec, eventRecorder recyclerclient.RecycleEventRecorder) error

func (*FakeVolumePlugin) RequiresFSResize Uses

func (plugin *FakeVolumePlugin) RequiresFSResize() bool

func (*FakeVolumePlugin) RequiresRemount Uses

func (plugin *FakeVolumePlugin) RequiresRemount() bool

func (*FakeVolumePlugin) SupportsBulkVolumeVerification Uses

func (plugin *FakeVolumePlugin) SupportsBulkVolumeVerification() bool

func (*FakeVolumePlugin) SupportsMountOption Uses

func (plugin *FakeVolumePlugin) SupportsMountOption() bool

func (*FakeVolumePlugin) VolumeLimitKey Uses

func (plugin *FakeVolumePlugin) VolumeLimitKey(spec *Spec) string

type MockVolume Uses

type MockVolume struct {
    mock.Mock
}

func (*MockVolume) GetMetrics Uses

func (_m *MockVolume) GetMetrics() (*Metrics, error)

GetMetrics provides a mock function with given fields:

func (*MockVolume) GetPath Uses

func (_m *MockVolume) GetPath() string

GetPath provides a mock function with given fields:

Package testing imports 30 packages (graph) and is imported by 5 packages. Updated 2019-07-18. Refresh now. Tools for package owners.