fake

package
v1.28.0-alpha.3...-059ce4e Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NodePublishTimeOut_VolumeID is volume id that will result in NodePublish operation to timeout
	NodePublishTimeOut_VolumeID = "node-publish-timeout"

	// NodeStageTimeOut_VolumeID is a volume id that will result in NodeStage operation to timeout
	NodeStageTimeOut_VolumeID = "node-stage-timeout"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CSIVolume

type CSIVolume struct {
	VolumeHandle     string
	VolumeContext    map[string]string
	Path             string
	DeviceMountPath  string
	FSType           string
	MountFlags       []string
	VolumeMountGroup string
}

type Closer

type Closer struct {
	// contains filtered or unexported fields
}

func NewCloser

func NewCloser(t *testing.T) *Closer

func (*Closer) Check

func (c *Closer) Check() *Closer

func (*Closer) Close

func (c *Closer) Close() error

type ControllerClient

type ControllerClient struct {
	// contains filtered or unexported fields
}

ControllerClient represents a CSI Controller client

func (*ControllerClient) ControllerGetCapabilities

ControllerGetCapabilities implements csi method

func (*ControllerClient) ControllerPublishVolume

ControllerPublishVolume implements csi method

func (*ControllerClient) ControllerUnpublishVolume

ControllerUnpublishVolume implements csi method

func (*ControllerClient) CreateVolume

CreateVolume implements csi method

func (*ControllerClient) DeleteVolume

DeleteVolume implements csi method

func (*ControllerClient) GetCapacity

GetCapacity implements csi method

func (*ControllerClient) ListVolumes

ListVolumes implements csi method

func (*ControllerClient) SetNextCapabilities

func (f *ControllerClient) SetNextCapabilities(caps []*csipb.ControllerServiceCapability)

SetNextCapabilities injects next expected capabilities

func (*ControllerClient) SetNextError

func (f *ControllerClient) SetNextError(err error)

SetNextError injects next expected error

func (*ControllerClient) ValidateVolumeCapabilities

ValidateVolumeCapabilities implements csi method

type IdentityClient

type IdentityClient struct {
	// contains filtered or unexported fields
}

IdentityClient is a CSI identity client used for testing

func (*IdentityClient) GetPluginCapabilities

GetPluginCapabilities implements csi method

func (*IdentityClient) GetPluginInfo

GetPluginInfo returns plugin info

func (*IdentityClient) Probe

Probe implements csi method

func (*IdentityClient) SetNextError

func (f *IdentityClient) SetNextError(err error)

SetNextError injects expected error

type NodeClient

type NodeClient struct {
	FakeNodeExpansionRequest *csipb.NodeExpandVolumeRequest
	// contains filtered or unexported fields
}

NodeClient returns CSI node client

func NewNodeClient

func NewNodeClient(stageUnstageSet bool) *NodeClient

NewNodeClient returns fake node client

func NewNodeClientWithExpansion

func NewNodeClientWithExpansion(stageUnstageSet bool, expansionSet bool) *NodeClient

func NewNodeClientWithSingleNodeMultiWriter

func NewNodeClientWithSingleNodeMultiWriter(singleNodeMultiWriterSet bool) *NodeClient

func NewNodeClientWithVolumeMountGroup

func NewNodeClientWithVolumeMountGroup(stageUnstageSet, volumeMountGroupSet bool) *NodeClient

func NewNodeClientWithVolumeStats

func NewNodeClientWithVolumeStats(volumeStatsSet bool) *NodeClient

func NewNodeClientWithVolumeStatsAndCondition

func NewNodeClientWithVolumeStatsAndCondition(volumeStatsSet, volumeConditionSet bool) *NodeClient

func (*NodeClient) AddNodePublishedVolume

func (f *NodeClient) AddNodePublishedVolume(volID, deviceMountPath string, volumeContext map[string]string)

AddNodePublishedVolume adds specified volume to nodePublishedVolumes

func (*NodeClient) AddNodeStagedVolume

func (f *NodeClient) AddNodeStagedVolume(volID, deviceMountPath string, volumeContext map[string]string)

AddNodeStagedVolume adds specified volume to nodeStagedVolumes

func (*NodeClient) GetNodePublishedVolumes

func (f *NodeClient) GetNodePublishedVolumes() map[string]CSIVolume

GetNodePublishedVolumes returns node published volumes

func (*NodeClient) GetNodeStagedVolumes

func (f *NodeClient) GetNodeStagedVolumes() map[string]CSIVolume

GetNodeStagedVolumes returns node staged volumes

func (*NodeClient) NodeExpandVolume

NodeExpandVolume implements csi method

func (*NodeClient) NodeGetCapabilities

NodeGetCapabilities implements csi method

func (*NodeClient) NodeGetInfo

NodeGetId implements csi method

func (*NodeClient) NodeGetVolumeStats

NodeGetVolumeStats implements csi method

func (*NodeClient) NodePublishVolume

NodePublishVolume implements CSI NodePublishVolume

func (*NodeClient) NodeStageVolume

NodeStagevolume implements csi method

func (*NodeClient) NodeUnpublishVolume

NodeUnpublishVolume implements csi method

func (*NodeClient) NodeUnstageVolume

NodeUnstageVolume implements csi method

func (*NodeClient) SetNextError

func (f *NodeClient) SetNextError(err error)

SetNextError injects next expected error

func (*NodeClient) SetNodeGetInfoResp

func (f *NodeClient) SetNodeGetInfoResp(resp *csipb.NodeGetInfoResponse)

func (*NodeClient) SetNodeVolumeStatsResp

func (f *NodeClient) SetNodeVolumeStatsResp(resp *csipb.NodeGetVolumeStatsResponse)

Jump to

Keyboard shortcuts

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