mocks

package
v2.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	mock.Mock
}

Consumer is an autogenerated mock type for the Consumer type

func (*Consumer) Arrays

func (_m *Consumer) Arrays() map[string]*array.PowerStoreArray

Arrays provides a mock function with given fields:

func (*Consumer) DefaultArray

func (_m *Consumer) DefaultArray() *array.PowerStoreArray

DefaultArray provides a mock function with given fields:

func (*Consumer) RegisterK8sCluster

func (_m *Consumer) RegisterK8sCluster(_a0 fs.Interface) error

RegisterK8sCluster provides a mock function with given fields: _a0

func (*Consumer) SetArrays

func (_m *Consumer) SetArrays(_a0 map[string]*array.PowerStoreArray)

SetArrays provides a mock function with given fields: _a0

func (*Consumer) SetDefaultArray

func (_m *Consumer) SetDefaultArray(_a0 *array.PowerStoreArray)

SetDefaultArray provides a mock function with given fields: _a0

func (*Consumer) UpdateArrays

func (_m *Consumer) UpdateArrays(_a0 string, _a1 fs.Interface) error

UpdateArrays provides a mock function with given fields: _a0, _a1

type ControllerInterface

type ControllerInterface struct {
	mock.Mock
}

ControllerInterface is an autogenerated mock type for the ControllerInterface type

func (*ControllerInterface) Arrays

func (_m *ControllerInterface) Arrays() map[string]*array.PowerStoreArray

Arrays provides a mock function with given fields:

func (*ControllerInterface) ControllerPublishVolume

ControllerPublishVolume provides a mock function with given fields: ctx, req

func (*ControllerInterface) ControllerUnpublishVolume

ControllerUnpublishVolume provides a mock function with given fields: ctx, req

func (*ControllerInterface) CreateVolume

CreateVolume provides a mock function with given fields: ctx, req

func (*ControllerInterface) DefaultArray

func (_m *ControllerInterface) DefaultArray() *array.PowerStoreArray

DefaultArray provides a mock function with given fields:

func (*ControllerInterface) DeleteVolume

DeleteVolume provides a mock function with given fields: ctx, req

func (*ControllerInterface) RegisterK8sCluster

func (_m *ControllerInterface) RegisterK8sCluster(_a0 fs.Interface) error

RegisterK8sCluster provides a mock function with given fields: _a0

func (*ControllerInterface) SetArrays

func (_m *ControllerInterface) SetArrays(_a0 map[string]*array.PowerStoreArray)

SetArrays provides a mock function with given fields: _a0

func (*ControllerInterface) SetDefaultArray

func (_m *ControllerInterface) SetDefaultArray(_a0 *array.PowerStoreArray)

SetDefaultArray provides a mock function with given fields: _a0

func (*ControllerInterface) UpdateArrays

func (_m *ControllerInterface) UpdateArrays(_a0 string, _a1 fs.Interface) error

UpdateArrays provides a mock function with given fields: _a0, _a1

type FcConnector

type FcConnector struct {
	mock.Mock
}

FcConnector is an autogenerated mock type for the FcConnector type

func (*FcConnector) ConnectVolume

func (_m *FcConnector) ConnectVolume(ctx context.Context, info gobrick.FCVolumeInfo) (gobrick.Device, error)

ConnectVolume provides a mock function with given fields: ctx, info

func (*FcConnector) DisconnectVolumeByDeviceName

func (_m *FcConnector) DisconnectVolumeByDeviceName(ctx context.Context, name string) error

DisconnectVolumeByDeviceName provides a mock function with given fields: ctx, name

func (*FcConnector) GetInitiatorPorts

func (_m *FcConnector) GetInitiatorPorts(ctx context.Context) ([]string, error)

GetInitiatorPorts provides a mock function with given fields: ctx

type FileInfo

type FileInfo struct {
	mock.Mock
}

FileInfo is an autogenerated mock type for the FileInfo type

func (*FileInfo) IsDir

func (_m *FileInfo) IsDir() bool

IsDir provides a mock function with given fields:

func (*FileInfo) ModTime

func (_m *FileInfo) ModTime() time.Time

ModTime provides a mock function with given fields:

func (*FileInfo) Mode

func (_m *FileInfo) Mode() iofs.FileMode

Mode provides a mock function with given fields:

func (*FileInfo) Name

func (_m *FileInfo) Name() string

Name provides a mock function with given fields:

func (*FileInfo) Size

func (_m *FileInfo) Size() int64

Size provides a mock function with given fields:

func (*FileInfo) Sys

func (_m *FileInfo) Sys() interface{}

Sys provides a mock function with given fields:

type FsInterface

type FsInterface struct {
	mock.Mock
}

FsInterface is an autogenerated mock type for the FsInterface type

func (*FsInterface) Chmod

func (_m *FsInterface) Chmod(name string, perm fs.FileMode) error

Chmod provides a mock function with given fields: name, perm

func (*FsInterface) Create

func (_m *FsInterface) Create(name string) (*os.File, error)

Create provides a mock function with given fields: name

func (*FsInterface) ExecCommand

func (_m *FsInterface) ExecCommand(name string, args ...string) ([]byte, error)

ExecCommand provides a mock function with given fields: name, args

func (*FsInterface) ExecCommandOutput

func (_m *FsInterface) ExecCommandOutput(name string, args ...string) ([]byte, error)

ExecCommandOutput provides a mock function with given fields: name, args

func (*FsInterface) GetUtil

func (_m *FsInterface) GetUtil() commonfs.UtilInterface

GetUtil provides a mock function with given fields:

func (*FsInterface) IsDeviceOrResourceBusy

func (_m *FsInterface) IsDeviceOrResourceBusy(err error) bool

IsDeviceOrResourceBusy provides a mock function with given fields: err

func (*FsInterface) IsNotExist

func (_m *FsInterface) IsNotExist(err error) bool

IsNotExist provides a mock function with given fields: err

func (*FsInterface) MkFileIdempotent

func (_m *FsInterface) MkFileIdempotent(path string) (bool, error)

MkFileIdempotent provides a mock function with given fields: path

func (*FsInterface) Mkdir

func (_m *FsInterface) Mkdir(name string, perm fs.FileMode) error

Mkdir provides a mock function with given fields: name, perm

func (*FsInterface) MkdirAll

func (_m *FsInterface) MkdirAll(name string, perm fs.FileMode) error

MkdirAll provides a mock function with given fields: name, perm

func (*FsInterface) NetDial

func (_m *FsInterface) NetDial(endpoint string) (net.Conn, error)

NetDial provides a mock function with given fields: endpoint

func (*FsInterface) OpenFile

func (_m *FsInterface) OpenFile(name string, flag int, perm fs.FileMode) (*os.File, error)

OpenFile provides a mock function with given fields: name, flag, perm

func (*FsInterface) ParseProcMounts

func (_m *FsInterface) ParseProcMounts(ctx context.Context, content io.Reader) ([]gofsutil.Info, error)

ParseProcMounts provides a mock function with given fields: ctx, content

func (*FsInterface) ReadFile

func (_m *FsInterface) ReadFile(name string) ([]byte, error)

ReadFile provides a mock function with given fields: name

func (*FsInterface) Remove

func (_m *FsInterface) Remove(name string) error

Remove provides a mock function with given fields: name

func (*FsInterface) RemoveAll

func (_m *FsInterface) RemoveAll(name string) error

RemoveAll provides a mock function with given fields: name

func (*FsInterface) Stat

func (_m *FsInterface) Stat(name string) (commonfs.FileInfo, error)

Stat provides a mock function with given fields: name

func (*FsInterface) WriteFile

func (_m *FsInterface) WriteFile(filename string, data []byte, perm fs.FileMode) error

WriteFile provides a mock function with given fields: filename, data, perm

func (*FsInterface) WriteString

func (_m *FsInterface) WriteString(file *os.File, str string) (int, error)

WriteString provides a mock function with given fields: file, str

type GeneralSnapshot

type GeneralSnapshot struct {
	mock.Mock
}

GeneralSnapshot is an autogenerated mock type for the GeneralSnapshot type

func (*GeneralSnapshot) GetID

func (_m *GeneralSnapshot) GetID() string

GetID provides a mock function with given fields:

func (*GeneralSnapshot) GetSize

func (_m *GeneralSnapshot) GetSize() int64

GetSize provides a mock function with given fields:

func (*GeneralSnapshot) GetSourceID

func (_m *GeneralSnapshot) GetSourceID() string

GetSourceID provides a mock function with given fields:

func (*GeneralSnapshot) GetType

func (_m *GeneralSnapshot) GetType() controller.SnapshotType

GetType provides a mock function with given fields:

type ISCSIConnector

type ISCSIConnector struct {
	mock.Mock
}

ISCSIConnector is an autogenerated mock type for the ISCSIConnector type

func (*ISCSIConnector) ConnectVolume

func (_m *ISCSIConnector) ConnectVolume(ctx context.Context, info gobrick.ISCSIVolumeInfo) (gobrick.Device, error)

ConnectVolume provides a mock function with given fields: ctx, info

func (*ISCSIConnector) DisconnectVolumeByDeviceName

func (_m *ISCSIConnector) DisconnectVolumeByDeviceName(ctx context.Context, name string) error

DisconnectVolumeByDeviceName provides a mock function with given fields: ctx, name

func (*ISCSIConnector) GetInitiatorName

func (_m *ISCSIConnector) GetInitiatorName(ctx context.Context) ([]string, error)

GetInitiatorName provides a mock function with given fields: ctx

type NFSv4ACLsInterface

type NFSv4ACLsInterface struct {
	mock.Mock
}

NFSv4ACLsInterface is an autogenerated mock type for the NFSv4ACLsInterface type

func (*NFSv4ACLsInterface) SetNfsv4Acls

func (_m *NFSv4ACLsInterface) SetNfsv4Acls(acls string, dir string) error

SetNfsv4Acls provides a mock function with given fields: acls, dir

type NVMEConnector

type NVMEConnector struct {
	mock.Mock
}

NVMEConnector is an autogenerated mock type for the NVMEConnector type

func NewNVMEConnector

func NewNVMEConnector(t testing.TB) *NVMEConnector

NewNVMEConnector creates a new instance of NVMEConnector. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.

func (*NVMEConnector) ConnectVolume

func (_m *NVMEConnector) ConnectVolume(ctx context.Context, info gobrick.NVMeVolumeInfo, useFC bool) (gobrick.Device, error)

ConnectVolume provides a mock function with given fields: ctx, info, useFC

func (*NVMEConnector) DisconnectVolumeByDeviceName

func (_m *NVMEConnector) DisconnectVolumeByDeviceName(ctx context.Context, name string) error

DisconnectVolumeByDeviceName provides a mock function with given fields: ctx, name

func (*NVMEConnector) GetInitiatorName

func (_m *NVMEConnector) GetInitiatorName(ctx context.Context) ([]string, error)

GetInitiatorName provides a mock function with given fields: ctx

type NodeLabelsRetrieverInterface added in v2.8.0

type NodeLabelsRetrieverInterface struct {
	mock.Mock
}

NodeLabelsRetrieverInterface is an autogenerated mock type for the NodeLabelsRetrieverInterface type

func NewNodeLabelsRetrieverInterface added in v2.8.0

func NewNodeLabelsRetrieverInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *NodeLabelsRetrieverInterface

NewNodeLabelsRetrieverInterface creates a new instance of NodeLabelsRetrieverInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*NodeLabelsRetrieverInterface) BuildConfigFromFlags added in v2.8.0

func (_m *NodeLabelsRetrieverInterface) BuildConfigFromFlags(masterURL string, kubeconfig string) (*rest.Config, error)

BuildConfigFromFlags provides a mock function with given fields: masterURL, kubeconfig

func (*NodeLabelsRetrieverInterface) GetNodeLabels added in v2.8.0

func (_m *NodeLabelsRetrieverInterface) GetNodeLabels(ctx context.Context, k8sclientset *kubernetes.Clientset, kubeNodeName string) (map[string]string, error)

GetNodeLabels provides a mock function with given fields: ctx, k8sclientset, kubeNodeName

func (*NodeLabelsRetrieverInterface) InClusterConfig added in v2.8.0

func (_m *NodeLabelsRetrieverInterface) InClusterConfig() (*rest.Config, error)

InClusterConfig provides a mock function with given fields:

func (*NodeLabelsRetrieverInterface) NewForConfig added in v2.8.0

func (_m *NodeLabelsRetrieverInterface) NewForConfig(config *rest.Config) (*kubernetes.Clientset, error)

NewForConfig provides a mock function with given fields: config

type NodeVolumePublisher

type NodeVolumePublisher struct {
	mock.Mock
}

NodeVolumePublisher is an autogenerated mock type for the NodeVolumePublisher type

func (*NodeVolumePublisher) Publish

func (_m *NodeVolumePublisher) Publish(ctx context.Context, logFields logrus.Fields, _a2 fs.Interface, cap *csi.VolumeCapability, isRO bool, targetPath string, stagingPath string) (*csi.NodePublishVolumeResponse, error)

Publish provides a mock function with given fields: ctx, logFields, _a2, cap, isRO, targetPath, stagingPath

type NodeVolumeStager

type NodeVolumeStager struct {
	mock.Mock
}

NodeVolumeStager is an autogenerated mock type for the NodeVolumeStager type

func (*NodeVolumeStager) Stage

Stage provides a mock function with given fields: ctx, req, logFields, _a3, id

type TracerConfigurator

type TracerConfigurator struct {
	mock.Mock
}

TracerConfigurator is an autogenerated mock type for the TracerConfigurator type

func (*TracerConfigurator) FromEnv

func (_m *TracerConfigurator) FromEnv() (*config.Configuration, error)

FromEnv provides a mock function with given fields:

type UtilInterface

type UtilInterface struct {
	mock.Mock
}

UtilInterface is an autogenerated mock type for the UtilInterface type

func NewUtilInterface

func NewUtilInterface(t mockConstructorTestingTNewUtilInterface) *UtilInterface

NewUtilInterface creates a new instance of UtilInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*UtilInterface) BindMount

func (_m *UtilInterface) BindMount(ctx context.Context, source string, target string, options ...string) error

BindMount provides a mock function with given fields: ctx, source, target, options

func (*UtilInterface) DeviceRescan

func (_m *UtilInterface) DeviceRescan(ctx context.Context, devicePath string) error

DeviceRescan provides a mock function with given fields: ctx, devicePath

func (*UtilInterface) FindFSType

func (_m *UtilInterface) FindFSType(ctx context.Context, mountpoint string) (string, error)

FindFSType provides a mock function with given fields: ctx, mountpoint

func (*UtilInterface) Format

func (_m *UtilInterface) Format(ctx context.Context, source string, target string, fsType string, options ...string) error

Format provides a mock function with given fields: ctx, source, target, fsType, options

func (*UtilInterface) FormatAndMount

func (_m *UtilInterface) FormatAndMount(ctx context.Context, source string, target string, fsType string, options ...string) error

FormatAndMount provides a mock function with given fields: ctx, source, target, fsType, options

func (*UtilInterface) GetDevMounts

func (_m *UtilInterface) GetDevMounts(ctx context.Context, dev string) ([]gofsutil.Info, error)

GetDevMounts provides a mock function with given fields: ctx, dev

func (*UtilInterface) GetDiskFormat

func (_m *UtilInterface) GetDiskFormat(ctx context.Context, disk string) (string, error)

GetDiskFormat provides a mock function with given fields: ctx, disk

func (*UtilInterface) GetFCHostPortWWNs

func (_m *UtilInterface) GetFCHostPortWWNs(ctx context.Context) ([]string, error)

GetFCHostPortWWNs provides a mock function with given fields: ctx

func (*UtilInterface) GetMountInfoFromDevice

func (_m *UtilInterface) GetMountInfoFromDevice(ctx context.Context, devID string) (*gofsutil.DeviceMountInfo, error)

GetMountInfoFromDevice provides a mock function with given fields: ctx, devID

func (*UtilInterface) GetMounts

func (_m *UtilInterface) GetMounts(ctx context.Context) ([]gofsutil.Info, error)

GetMounts provides a mock function with given fields: ctx

func (*UtilInterface) GetMpathNameFromDevice

func (_m *UtilInterface) GetMpathNameFromDevice(ctx context.Context, device string) (string, error)

GetMpathNameFromDevice provides a mock function with given fields: ctx, device

func (*UtilInterface) GetSysBlockDevicesForVolumeWWN

func (_m *UtilInterface) GetSysBlockDevicesForVolumeWWN(ctx context.Context, volumeWWN string) ([]string, error)

GetSysBlockDevicesForVolumeWWN provides a mock function with given fields: ctx, volumeWWN

func (*UtilInterface) IssueLIPToAllFCHosts

func (_m *UtilInterface) IssueLIPToAllFCHosts(ctx context.Context) error

IssueLIPToAllFCHosts provides a mock function with given fields: ctx

func (*UtilInterface) Mount

func (_m *UtilInterface) Mount(ctx context.Context, source string, target string, fsType string, options ...string) error

Mount provides a mock function with given fields: ctx, source, target, fsType, options

func (*UtilInterface) MultipathCommand

func (_m *UtilInterface) MultipathCommand(ctx context.Context, timeout time.Duration, chroot string, arguments ...string) ([]byte, error)

MultipathCommand provides a mock function with given fields: ctx, timeout, chroot, arguments

func (*UtilInterface) RemoveBlockDevice

func (_m *UtilInterface) RemoveBlockDevice(ctx context.Context, blockDevicePath string) error

RemoveBlockDevice provides a mock function with given fields: ctx, blockDevicePath

func (*UtilInterface) RescanSCSIHost

func (_m *UtilInterface) RescanSCSIHost(ctx context.Context, targets []string, lun string) error

RescanSCSIHost provides a mock function with given fields: ctx, targets, lun

func (*UtilInterface) ResizeFS

func (_m *UtilInterface) ResizeFS(ctx context.Context, volumePath string, devicePath string, ppathDevice string, mpathDevice string, fsType string) error

ResizeFS provides a mock function with given fields: ctx, volumePath, devicePath, ppathDevice, mpathDevice, fsType

func (*UtilInterface) ResizeMultipath

func (_m *UtilInterface) ResizeMultipath(ctx context.Context, deviceName string) error

ResizeMultipath provides a mock function with given fields: ctx, deviceName

func (*UtilInterface) TargetIPLUNToDevicePath

func (_m *UtilInterface) TargetIPLUNToDevicePath(ctx context.Context, targetIP string, lunID int) (map[string]string, error)

TargetIPLUNToDevicePath provides a mock function with given fields: ctx, targetIP, lunID

func (*UtilInterface) Unmount

func (_m *UtilInterface) Unmount(ctx context.Context, target string) error

Unmount provides a mock function with given fields: ctx, target

func (*UtilInterface) ValidateDevice

func (_m *UtilInterface) ValidateDevice(ctx context.Context, source string) (string, error)

ValidateDevice provides a mock function with given fields: ctx, source

func (*UtilInterface) WWNToDevicePath

func (_m *UtilInterface) WWNToDevicePath(ctx context.Context, wwn string) (string, string, error)

WWNToDevicePath provides a mock function with given fields: ctx, wwn

type VolumeCreator

type VolumeCreator struct {
	mock.Mock
}

VolumeCreator is an autogenerated mock type for the VolumeCreator type

func (*VolumeCreator) CheckIfAlreadyExists

func (_m *VolumeCreator) CheckIfAlreadyExists(ctx context.Context, name string, sizeInBytes int64, client gopowerstore.Client) (*csi.Volume, error)

CheckIfAlreadyExists provides a mock function with given fields: ctx, name, sizeInBytes, client

func (*VolumeCreator) CheckName

func (_m *VolumeCreator) CheckName(ctx context.Context, name string) error

CheckName provides a mock function with given fields: ctx, name

func (*VolumeCreator) CheckSize

func (_m *VolumeCreator) CheckSize(ctx context.Context, cr *csi.CapacityRange) (int64, error)

CheckSize provides a mock function with given fields: ctx, cr

func (*VolumeCreator) Clone

func (_m *VolumeCreator) Clone(ctx context.Context, volumeSource *csi.VolumeContentSource_VolumeSource, volumeName string, sizeInBytes int64, parameters map[string]string, client gopowerstore.Client) (*csi.Volume, error)

Clone provides a mock function with given fields: ctx, volumeSource, volumeName, sizeInBytes, parameters, client

func (*VolumeCreator) Create

Create provides a mock function with given fields: ctx, req, sizeInBytes, client

func (*VolumeCreator) CreateVolumeFromSnapshot

func (_m *VolumeCreator) CreateVolumeFromSnapshot(ctx context.Context, snapshotSource *csi.VolumeContentSource_SnapshotSource, volumeName string, sizeInBytes int64, parameters map[string]string, client gopowerstore.Client) (*csi.Volume, error)

CreateVolumeFromSnapshot provides a mock function with given fields: ctx, snapshotSource, volumeName, sizeInBytes, parameters, client

type VolumePublisher

type VolumePublisher struct {
	mock.Mock
}

VolumePublisher is an autogenerated mock type for the VolumePublisher type

func (*VolumePublisher) CheckIfVolumeExists

func (_m *VolumePublisher) CheckIfVolumeExists(ctx context.Context, client gopowerstore.Client, volID string) error

CheckIfVolumeExists provides a mock function with given fields: ctx, client, volID

func (*VolumePublisher) Publish

Publish provides a mock function with given fields: ctx, req, client, kubeNodeID, volumeID

type VolumeSnapshotter

type VolumeSnapshotter struct {
	mock.Mock
}

VolumeSnapshotter is an autogenerated mock type for the VolumeSnapshotter type

func (*VolumeSnapshotter) Create

Create provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*VolumeSnapshotter) GetExistingSnapshot

func (_m *VolumeSnapshotter) GetExistingSnapshot(_a0 context.Context, _a1 string, _a2 gopowerstore.Client) (controller.GeneralSnapshot, error)

GetExistingSnapshot provides a mock function with given fields: _a0, _a1, _a2

Jump to

Keyboard shortcuts

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