package testing

import "github.com/hashicorp/nomad/plugins/csi/testing"

Index

Types

type ControllerClient

type ControllerClient struct {
	NextErr                                error
	NextCapabilitiesResponse               *csipbv1.ControllerGetCapabilitiesResponse
	NextPublishVolumeResponse              *csipbv1.ControllerPublishVolumeResponse
	NextUnpublishVolumeResponse            *csipbv1.ControllerUnpublishVolumeResponse
	NextValidateVolumeCapabilitiesResponse *csipbv1.ValidateVolumeCapabilitiesResponse
	NextCreateVolumeResponse               *csipbv1.CreateVolumeResponse
	NextExpandVolumeResponse               *csipbv1.ControllerExpandVolumeResponse
	LastExpandVolumeRequest                *csipbv1.ControllerExpandVolumeRequest
	NextDeleteVolumeResponse               *csipbv1.DeleteVolumeResponse
	NextListVolumesResponse                *csipbv1.ListVolumesResponse
	NextCreateSnapshotResponse             *csipbv1.CreateSnapshotResponse
	NextDeleteSnapshotResponse             *csipbv1.DeleteSnapshotResponse
	NextListSnapshotsResponse              *csipbv1.ListSnapshotsResponse
}

ControllerClient is a CSI controller client used for testing

func NewControllerClient

func NewControllerClient() *ControllerClient

NewControllerClient returns a new ControllerClient

func (*ControllerClient) ControllerExpandVolume

func (*ControllerClient) ControllerGetCapabilities

func (*ControllerClient) ControllerPublishVolume

func (*ControllerClient) ControllerUnpublishVolume

func (*ControllerClient) CreateSnapshot

func (*ControllerClient) CreateVolume

func (*ControllerClient) DeleteSnapshot

func (*ControllerClient) DeleteVolume

func (*ControllerClient) ListSnapshots

func (*ControllerClient) ListVolumes

func (*ControllerClient) Reset

func (c *ControllerClient) Reset()

func (*ControllerClient) ValidateVolumeCapabilities

type IdentityClient

type IdentityClient struct {
	NextErr                error
	NextPluginInfo         *csipbv1.GetPluginInfoResponse
	NextPluginCapabilities *csipbv1.GetPluginCapabilitiesResponse
	NextPluginProbe        *csipbv1.ProbeResponse
}

IdentityClient is a CSI identity client used for testing

func NewIdentityClient

func NewIdentityClient() *IdentityClient

NewIdentityClient returns a new IdentityClient

func (*IdentityClient) GetPluginCapabilities

GetPluginCapabilities implements csi method

func (*IdentityClient) GetPluginInfo

GetPluginInfo returns plugin info

func (*IdentityClient) Probe

Probe implements csi method

func (*IdentityClient) Reset

func (f *IdentityClient) Reset()

type NodeClient

type NodeClient struct {
	NextErr                     error
	NextCapabilitiesResponse    *csipbv1.NodeGetCapabilitiesResponse
	NextGetInfoResponse         *csipbv1.NodeGetInfoResponse
	NextStageVolumeResponse     *csipbv1.NodeStageVolumeResponse
	NextUnstageVolumeResponse   *csipbv1.NodeUnstageVolumeResponse
	NextPublishVolumeResponse   *csipbv1.NodePublishVolumeResponse
	NextUnpublishVolumeResponse *csipbv1.NodeUnpublishVolumeResponse
	NextExpandVolumeResponse    *csipbv1.NodeExpandVolumeResponse
	LastExpandVolumeRequest     *csipbv1.NodeExpandVolumeRequest
}

NodeClient is a CSI Node client used for testing

func NewNodeClient

func NewNodeClient() *NodeClient

NewNodeClient returns a new stub NodeClient

func (*NodeClient) NodeExpandVolume

func (*NodeClient) NodeGetCapabilities

func (*NodeClient) NodeGetInfo

func (*NodeClient) NodePublishVolume

func (*NodeClient) NodeStageVolume

func (*NodeClient) NodeUnpublishVolume

func (*NodeClient) NodeUnstageVolume

func (*NodeClient) Reset

func (c *NodeClient) Reset()

Source Files

client.go

Version
v1.10.0 (latest)
Published
Apr 9, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
2 days ago

Tools for package owners.