testing

package
v1.31.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const TestPluginName = "kubernetes.io/testPlugin"

Variables

This section is empty.

Functions

func CreateTestClient

func CreateTestClient() *fake.Clientset

func CreateTestPlugin added in v1.7.0

func CreateTestPlugin(supportCSIVolume bool) []volume.VolumePlugin

func GetTestVolumeSpec

func GetTestVolumeSpec(volumeName string, diskName v1.UniqueVolumeName) *volume.Spec

GetTestVolumeSpec returns a test volume spec

func NewNFSPV added in v1.25.0

func NewNFSPV(pvName, volumeName string) *v1.PersistentVolume

Returns an NFS PV. This can be used for an in-tree volume that is not migrated (unlike NewPV, which uses the GCE persistent disk).

func NewPV added in v1.18.16

func NewPV(pvName, volumeName string) *v1.PersistentVolume

Returns a persistentVolume object

func NewPod

func NewPod(uid, name string) *v1.Pod

NewPod returns a test pod object

func NewPodWithVolume added in v1.7.0

func NewPodWithVolume(podName, volumeName, nodeName string) *v1.Pod

NewPodWithVolume returns a test pod object

func NewVolumeAttachment added in v1.18.16

func NewVolumeAttachment(vaName, pvName, nodeName string, status bool) *storagev1.VolumeAttachment

Returns a volumeAttachment object

Types

type TestPlugin added in v1.7.0

type TestPlugin struct {
	// SupportCSIVolume allows the plugin to support CSI volumes.
	// It does not mock the actual CSI volume operations.
	SupportCSIVolume bool
	ErrorEncountered bool
	// contains filtered or unexported fields
}

func (*TestPlugin) CanAttach added in v1.14.0

func (plugin *TestPlugin) CanAttach(spec *volume.Spec) (bool, error)

func (*TestPlugin) CanDeviceMount added in v1.15.0

func (plugin *TestPlugin) CanDeviceMount(spec *volume.Spec) (bool, error)

func (*TestPlugin) CanSupport added in v1.7.0

func (plugin *TestPlugin) CanSupport(spec *volume.Spec) bool

func (*TestPlugin) ConstructVolumeSpec added in v1.7.0

func (plugin *TestPlugin) ConstructVolumeSpec(volumeName, mountPath string) (volume.ReconstructedVolume, error)

func (*TestPlugin) GetAttachedVolumes added in v1.7.0

func (plugin *TestPlugin) GetAttachedVolumes() map[string][]string

func (*TestPlugin) GetDetachedVolumes added in v1.7.0

func (plugin *TestPlugin) GetDetachedVolumes() map[string][]string

func (*TestPlugin) GetDeviceMountRefs added in v1.7.0

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

func (*TestPlugin) GetErrorEncountered added in v1.7.0

func (plugin *TestPlugin) GetErrorEncountered() bool

func (*TestPlugin) GetPluginName added in v1.7.0

func (plugin *TestPlugin) GetPluginName() string

func (*TestPlugin) GetVolumeName added in v1.7.0

func (plugin *TestPlugin) GetVolumeName(spec *volume.Spec) (string, error)

func (*TestPlugin) Init added in v1.7.0

func (plugin *TestPlugin) Init(host volume.VolumeHost) error

func (*TestPlugin) NewAttacher added in v1.7.0

func (plugin *TestPlugin) NewAttacher() (volume.Attacher, error)

func (*TestPlugin) NewDetacher added in v1.7.0

func (plugin *TestPlugin) NewDetacher() (volume.Detacher, error)

func (*TestPlugin) NewDeviceMounter added in v1.12.0

func (plugin *TestPlugin) NewDeviceMounter() (volume.DeviceMounter, error)

func (*TestPlugin) NewDeviceUnmounter added in v1.12.0

func (plugin *TestPlugin) NewDeviceUnmounter() (volume.DeviceUnmounter, error)

func (*TestPlugin) NewMounter added in v1.7.0

func (plugin *TestPlugin) NewMounter(spec *volume.Spec, podRef *v1.Pod) (volume.Mounter, error)

func (*TestPlugin) NewUnmounter added in v1.7.0

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

func (*TestPlugin) RequiresRemount added in v1.7.0

func (plugin *TestPlugin) RequiresRemount(spec *volume.Spec) bool

func (*TestPlugin) SupportsBulkVolumeVerification added in v1.7.0

func (plugin *TestPlugin) SupportsBulkVolumeVerification() bool

func (*TestPlugin) SupportsMountOption added in v1.7.0

func (plugin *TestPlugin) SupportsMountOption() bool

func (*TestPlugin) SupportsSELinuxContextMount added in v1.25.0

func (plugin *TestPlugin) SupportsSELinuxContextMount(spec *volume.Spec) (bool, error)

Jump to

Keyboard shortcuts

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