Documentation ¶
Index ¶
- Constants
- Variables
- func WaitForPvToResize(c clientset.Interface, ns *v1.Namespace, pvName string, ...) error
- type DataSource
- type DynamicallyProvisionedCmdVolumeTest
- type DynamicallyProvisionedCollocatedPodTest
- type DynamicallyProvisionedDeletePodTest
- type DynamicallyProvisionedReadOnlyVolumeTest
- type DynamicallyProvisionedReclaimPolicyTest
- type DynamicallyProvisionedResizeVolumeTest
- type DynamicallyProvisionedTopologyAwareVolumeTest
- type DynamicallyProvisionedVolumeSnapshotTest
- type PodDetails
- func (pod *PodDetails) SetupDeployment(client clientset.Interface, namespace *v1.Namespace, ...) (*TestDeployment, []func())
- func (pod *PodDetails) SetupWithDynamicVolumes(client clientset.Interface, namespace *v1.Namespace, ...) (*TestPod, []func())
- func (pod *PodDetails) SetupWithPreProvisionedVolumes(client clientset.Interface, namespace *v1.Namespace, ...) (*TestPod, []func())
- type PodExecCheck
- type PreProvisionedReadOnlyVolumeTest
- type PreProvisionedReclaimPolicyTest
- type PreProvisionedVolumeSnapshotTest
- type PreProvisionedVolumeTest
- type TestDeployment
- type TestPersistentVolumeClaim
- func (t *TestPersistentVolumeClaim) Cleanup()
- func (t *TestPersistentVolumeClaim) Create()
- func (t *TestPersistentVolumeClaim) DeleteBackingVolume(cloud awscloud.Cloud)
- func (t *TestPersistentVolumeClaim) DeleteBoundPersistentVolume()
- func (t *TestPersistentVolumeClaim) ReclaimPolicy() v1.PersistentVolumeReclaimPolicy
- func (t *TestPersistentVolumeClaim) ValidateProvisionedPersistentVolume()
- func (t *TestPersistentVolumeClaim) WaitForBound() v1.PersistentVolumeClaim
- func (t *TestPersistentVolumeClaim) WaitForPersistentVolumePhase(phase v1.PersistentVolumePhase)
- type TestPod
- func (t *TestPod) Cleanup()
- func (t *TestPod) Create()
- func (t *TestPod) Logs() ([]byte, error)
- func (t *TestPod) SetNodeSelector(nodeSelector map[string]string)
- func (t *TestPod) SetupRawBlockVolume(pvc *v1.PersistentVolumeClaim, name, devicePath string)
- func (t *TestPod) SetupVolume(pvc *v1.PersistentVolumeClaim, name, mountPath string, readOnly bool)
- func (t *TestPod) WaitForFailure()
- func (t *TestPod) WaitForRunning()
- func (t *TestPod) WaitForSuccess()
- type TestPreProvisionedPersistentVolume
- type TestStorageClass
- type TestVolumeSnapshotClass
- func (t *TestVolumeSnapshotClass) Cleanup()
- func (t *TestVolumeSnapshotClass) Create()
- func (t *TestVolumeSnapshotClass) CreateSnapshot(pvc *v1.PersistentVolumeClaim) *volumesnapshotv1.VolumeSnapshot
- func (t *TestVolumeSnapshotClass) CreateStaticVolumeSnapshot(vsc *volumesnapshotv1.VolumeSnapshotContent) *volumesnapshotv1.VolumeSnapshot
- func (t *TestVolumeSnapshotClass) CreateStaticVolumeSnapshotContent(snapshotId string) *volumesnapshotv1.VolumeSnapshotContent
- func (t *TestVolumeSnapshotClass) DeleteSnapshot(vs *volumesnapshotv1.VolumeSnapshot)
- func (t *TestVolumeSnapshotClass) DeleteVolumeSnapshotContent(vsc *volumesnapshotv1.VolumeSnapshotContent)
- func (t *TestVolumeSnapshotClass) ReadyToUse(snapshot *volumesnapshotv1.VolumeSnapshot)
- func (t *TestVolumeSnapshotClass) UpdateStaticVolumeSnapshotContent(volumeSnapshot *volumesnapshotv1.VolumeSnapshot, ...)
- type VolumeDetails
- func (volume *VolumeDetails) SetupDynamicPersistentVolumeClaim(client clientset.Interface, namespace *v1.Namespace, ...) (*TestPersistentVolumeClaim, []func())
- func (volume *VolumeDetails) SetupPreProvisionedPersistentVolumeClaim(client clientset.Interface, namespace *v1.Namespace, ...) (*TestPersistentVolumeClaim, []func())
- type VolumeDeviceDetails
- type VolumeMode
- type VolumeMountDetails
Constants ¶
const ( VolumeSnapshotKind = "VolumeSnapshot" VolumeSnapshotContentKind = "VolumeSnapshotContent" SnapshotAPIVersion = "snapshot.storage.k8s.io/v1" APIVersionv1 = "v1" )
Variables ¶
var (
SnapshotAPIGroup = "snapshot.storage.k8s.io"
)
Functions ¶
Types ¶
type DataSource ¶ added in v0.3.0
type DataSource struct {
Name string
}
type DynamicallyProvisionedCmdVolumeTest ¶ added in v0.3.0
type DynamicallyProvisionedCmdVolumeTest struct { CSIDriver driver.DynamicPVTestDriver Pods []PodDetails }
DynamicallyProvisionedCmdVolumeTest will provision required StorageClass(es), PVC(s) and Pod(s) Waiting for the PV provisioner to create a new PV Testing if the Pod(s) Cmd is run with a 0 exit code
type DynamicallyProvisionedCollocatedPodTest ¶
type DynamicallyProvisionedCollocatedPodTest struct { CSIDriver driver.DynamicPVTestDriver Pods []PodDetails ColocatePods bool }
DynamicallyProvisionedCollocatedPodTest will provision required StorageClass(es), PVC(s) and Pod(s) Waiting for the PV provisioner to create a new PV Testing if multiple Pod(s) can write simultaneously
type DynamicallyProvisionedDeletePodTest ¶
type DynamicallyProvisionedDeletePodTest struct { CSIDriver driver.DynamicPVTestDriver Pod PodDetails PodCheck *PodExecCheck }
DynamicallyProvisionedDeletePodTest will provision required StorageClass and Deployment Testing if the Pod can write and read to mounted volumes Deleting a pod, and again testing if the Pod can write and read to mounted volumes
type DynamicallyProvisionedReadOnlyVolumeTest ¶
type DynamicallyProvisionedReadOnlyVolumeTest struct { CSIDriver driver.DynamicPVTestDriver Pods []PodDetails }
DynamicallyProvisionedReadOnlyVolumeTest will provision required StorageClass(es), PVC(s) and Pod(s) Waiting for the PV provisioner to create a new PV Testing that the Pod(s) cannot write to the volume when mounted
type DynamicallyProvisionedReclaimPolicyTest ¶
type DynamicallyProvisionedReclaimPolicyTest struct { CSIDriver driver.DynamicPVTestDriver Volumes []VolumeDetails Cloud cloud.Cloud }
DynamicallyProvisionedReclaimPolicyTest will provision required PV(s) and PVC(s) Testing the correct behavior for different reclaimPolicies
type DynamicallyProvisionedResizeVolumeTest ¶ added in v0.9.0
type DynamicallyProvisionedResizeVolumeTest struct { CSIDriver driver.DynamicPVTestDriver Pod PodDetails }
DynamicallyProvisionedResizeVolumeTest will provision required StorageClass(es), PVC(s) and Pod(s) Waiting for the PV provisioner to create a new PV Update pvc storage size Waiting for new PVC and PV to be ready And finally attach pvc to the pod and wait for pod to be ready.
type DynamicallyProvisionedTopologyAwareVolumeTest ¶
type DynamicallyProvisionedTopologyAwareVolumeTest struct { CSIDriver driver.DynamicPVTestDriver Pods []PodDetails }
DynamicallyProvisionedTopologyAwareVolumeTest will provision required StorageClass(es), PVC(s) and Pod(s) Waiting for the PV provisioner to create a new PV Testing if the Pod(s) can write and read to mounted volumes Validate PVs have expected PV nodeAffinity
type DynamicallyProvisionedVolumeSnapshotTest ¶ added in v0.3.0
type DynamicallyProvisionedVolumeSnapshotTest struct { CSIDriver driver.PVTestDriver Pod PodDetails RestoredPod PodDetails }
DynamicallyProvisionedVolumeSnapshotTest will provision required StorageClass(es),VolumeSnapshotClass(es), PVC(s) and Pod(s) Waiting for the PV provisioner to create a new PV Testing if the Pod(s) can write and read to mounted volumes Create a snapshot, validate the data is still on the disk, and then write and read to it again And finally delete the snapshot This test only supports a single volume
func (*DynamicallyProvisionedVolumeSnapshotTest) Run ¶ added in v0.3.0
func (t *DynamicallyProvisionedVolumeSnapshotTest) Run(client clientset.Interface, restclient restclientset.Interface, namespace *v1.Namespace)
type PodDetails ¶
type PodDetails struct { Cmd string Volumes []VolumeDetails }
func (*PodDetails) SetupDeployment ¶
func (pod *PodDetails) SetupDeployment(client clientset.Interface, namespace *v1.Namespace, csiDriver driver.DynamicPVTestDriver) (*TestDeployment, []func())
func (*PodDetails) SetupWithDynamicVolumes ¶
func (pod *PodDetails) SetupWithDynamicVolumes(client clientset.Interface, namespace *v1.Namespace, csiDriver driver.DynamicPVTestDriver) (*TestPod, []func())
func (*PodDetails) SetupWithPreProvisionedVolumes ¶
func (pod *PodDetails) SetupWithPreProvisionedVolumes(client clientset.Interface, namespace *v1.Namespace, csiDriver driver.PreProvisionedVolumeTestDriver) (*TestPod, []func())
type PodExecCheck ¶
type PreProvisionedReadOnlyVolumeTest ¶
type PreProvisionedReadOnlyVolumeTest struct { CSIDriver driver.PreProvisionedVolumeTestDriver Pods []PodDetails }
PreProvisionedReadOnlyVolumeTest will provision required PV(s), PVC(s) and Pod(s) Testing that the Pod(s) cannot write to the volume when mounted
type PreProvisionedReclaimPolicyTest ¶
type PreProvisionedReclaimPolicyTest struct { CSIDriver driver.PreProvisionedVolumeTestDriver Volumes []VolumeDetails }
PreProvisionedReclaimPolicyTest will provision required PV(s) and PVC(s) Testing the correct behavior for different reclaimPolicies
type PreProvisionedVolumeSnapshotTest ¶ added in v0.9.0
type PreProvisionedVolumeSnapshotTest struct { CSIDriver driver.PVTestDriver Pod PodDetails }
func (*PreProvisionedVolumeSnapshotTest) Run ¶ added in v0.9.0
func (t *PreProvisionedVolumeSnapshotTest) Run(client clientset.Interface, restclient k8srestclient.Interface, namespace *v1.Namespace, snapshotId string)
type PreProvisionedVolumeTest ¶
type PreProvisionedVolumeTest struct { CSIDriver driver.PreProvisionedVolumeTestDriver Pods []PodDetails }
PreProvisionedVolumeTest will provision required PV(s), PVC(s) and Pod(s) Testing if the Pod(s) can write and read to mounted volumes
type TestDeployment ¶
type TestDeployment struct {
// contains filtered or unexported fields
}
func NewTestDeployment ¶
func NewTestDeployment(c clientset.Interface, ns *v1.Namespace, command string, pvc *v1.PersistentVolumeClaim, volumeName, mountPath string, readOnly bool) *TestDeployment
func (*TestDeployment) Cleanup ¶
func (t *TestDeployment) Cleanup()
func (*TestDeployment) Create ¶
func (t *TestDeployment) Create()
func (*TestDeployment) DeletePodAndWait ¶
func (t *TestDeployment) DeletePodAndWait()
func (*TestDeployment) Exec ¶
func (t *TestDeployment) Exec(command []string, expectedString string)
func (*TestDeployment) Logs ¶
func (t *TestDeployment) Logs() ([]byte, error)
func (*TestDeployment) WaitForPodReady ¶
func (t *TestDeployment) WaitForPodReady()
type TestPersistentVolumeClaim ¶
type TestPersistentVolumeClaim struct {
// contains filtered or unexported fields
}
func NewTestPersistentVolumeClaim ¶
func NewTestPersistentVolumeClaim(c clientset.Interface, ns *v1.Namespace, claimSize string, volumeMode VolumeMode, sc *storagev1.StorageClass) *TestPersistentVolumeClaim
func NewTestPersistentVolumeClaimWithDataSource ¶ added in v0.3.0
func NewTestPersistentVolumeClaimWithDataSource(c clientset.Interface, ns *v1.Namespace, claimSize string, volumeMode VolumeMode, sc *storagev1.StorageClass, dataSource *v1.TypedLocalObjectReference) *TestPersistentVolumeClaim
func (*TestPersistentVolumeClaim) Cleanup ¶
func (t *TestPersistentVolumeClaim) Cleanup()
func (*TestPersistentVolumeClaim) Create ¶
func (t *TestPersistentVolumeClaim) Create()
func (*TestPersistentVolumeClaim) DeleteBackingVolume ¶
func (t *TestPersistentVolumeClaim) DeleteBackingVolume(cloud awscloud.Cloud)
func (*TestPersistentVolumeClaim) DeleteBoundPersistentVolume ¶
func (t *TestPersistentVolumeClaim) DeleteBoundPersistentVolume()
func (*TestPersistentVolumeClaim) ReclaimPolicy ¶
func (t *TestPersistentVolumeClaim) ReclaimPolicy() v1.PersistentVolumeReclaimPolicy
func (*TestPersistentVolumeClaim) ValidateProvisionedPersistentVolume ¶
func (t *TestPersistentVolumeClaim) ValidateProvisionedPersistentVolume()
func (*TestPersistentVolumeClaim) WaitForBound ¶
func (t *TestPersistentVolumeClaim) WaitForBound() v1.PersistentVolumeClaim
func (*TestPersistentVolumeClaim) WaitForPersistentVolumePhase ¶
func (t *TestPersistentVolumeClaim) WaitForPersistentVolumePhase(phase v1.PersistentVolumePhase)
type TestPod ¶
type TestPod struct {
// contains filtered or unexported fields
}
func (*TestPod) SetNodeSelector ¶
func (*TestPod) SetupRawBlockVolume ¶ added in v0.3.0
func (t *TestPod) SetupRawBlockVolume(pvc *v1.PersistentVolumeClaim, name, devicePath string)
func (*TestPod) SetupVolume ¶
func (t *TestPod) SetupVolume(pvc *v1.PersistentVolumeClaim, name, mountPath string, readOnly bool)
func (*TestPod) WaitForFailure ¶
func (t *TestPod) WaitForFailure()
func (*TestPod) WaitForRunning ¶
func (t *TestPod) WaitForRunning()
func (*TestPod) WaitForSuccess ¶
func (t *TestPod) WaitForSuccess()
type TestPreProvisionedPersistentVolume ¶
type TestPreProvisionedPersistentVolume struct {
// contains filtered or unexported fields
}
func NewTestPreProvisionedPersistentVolume ¶
func NewTestPreProvisionedPersistentVolume(c clientset.Interface, pv *v1.PersistentVolume) *TestPreProvisionedPersistentVolume
func (*TestPreProvisionedPersistentVolume) Create ¶
func (pv *TestPreProvisionedPersistentVolume) Create() v1.PersistentVolume
type TestStorageClass ¶
type TestStorageClass struct {
// contains filtered or unexported fields
}
func NewTestStorageClass ¶
func NewTestStorageClass(c clientset.Interface, ns *v1.Namespace, sc *storagev1.StorageClass) *TestStorageClass
func (*TestStorageClass) Cleanup ¶
func (t *TestStorageClass) Cleanup()
func (*TestStorageClass) Create ¶
func (t *TestStorageClass) Create() storagev1.StorageClass
type TestVolumeSnapshotClass ¶ added in v0.3.0
type TestVolumeSnapshotClass struct {
// contains filtered or unexported fields
}
func CreateVolumeSnapshotClass ¶ added in v0.3.0
func CreateVolumeSnapshotClass(client restclientset.Interface, namespace *v1.Namespace, csiDriver driver.VolumeSnapshotTestDriver) (*TestVolumeSnapshotClass, func())
func NewTestVolumeSnapshotClass ¶ added in v0.3.0
func NewTestVolumeSnapshotClass(c restclientset.Interface, ns *v1.Namespace, vsc *volumesnapshotv1.VolumeSnapshotClass) *TestVolumeSnapshotClass
func (*TestVolumeSnapshotClass) Cleanup ¶ added in v0.3.0
func (t *TestVolumeSnapshotClass) Cleanup()
func (*TestVolumeSnapshotClass) Create ¶ added in v0.3.0
func (t *TestVolumeSnapshotClass) Create()
func (*TestVolumeSnapshotClass) CreateSnapshot ¶ added in v0.3.0
func (t *TestVolumeSnapshotClass) CreateSnapshot(pvc *v1.PersistentVolumeClaim) *volumesnapshotv1.VolumeSnapshot
func (*TestVolumeSnapshotClass) CreateStaticVolumeSnapshot ¶ added in v0.9.0
func (t *TestVolumeSnapshotClass) CreateStaticVolumeSnapshot(vsc *volumesnapshotv1.VolumeSnapshotContent) *volumesnapshotv1.VolumeSnapshot
func (*TestVolumeSnapshotClass) CreateStaticVolumeSnapshotContent ¶ added in v0.9.0
func (t *TestVolumeSnapshotClass) CreateStaticVolumeSnapshotContent(snapshotId string) *volumesnapshotv1.VolumeSnapshotContent
func (*TestVolumeSnapshotClass) DeleteSnapshot ¶ added in v0.3.0
func (t *TestVolumeSnapshotClass) DeleteSnapshot(vs *volumesnapshotv1.VolumeSnapshot)
func (*TestVolumeSnapshotClass) DeleteVolumeSnapshotContent ¶ added in v0.9.0
func (t *TestVolumeSnapshotClass) DeleteVolumeSnapshotContent(vsc *volumesnapshotv1.VolumeSnapshotContent)
func (*TestVolumeSnapshotClass) ReadyToUse ¶ added in v0.3.0
func (t *TestVolumeSnapshotClass) ReadyToUse(snapshot *volumesnapshotv1.VolumeSnapshot)
func (*TestVolumeSnapshotClass) UpdateStaticVolumeSnapshotContent ¶ added in v0.9.0
func (t *TestVolumeSnapshotClass) UpdateStaticVolumeSnapshotContent(volumeSnapshot *volumesnapshotv1.VolumeSnapshot, volumeSnapshotContent *volumesnapshotv1.VolumeSnapshotContent)
type VolumeDetails ¶
type VolumeDetails struct { VolumeType string FSType string Encrypted bool MountOptions []string ClaimSize string ReclaimPolicy *v1.PersistentVolumeReclaimPolicy AllowVolumeExpansion *bool VolumeBindingMode *storagev1.VolumeBindingMode AllowedTopologyValues []string VolumeMode VolumeMode VolumeMount VolumeMountDetails VolumeDevice VolumeDeviceDetails // Optional, used with pre-provisioned volumes VolumeID string // Optional, used with PVCs created from snapshots DataSource *DataSource }
func (*VolumeDetails) SetupDynamicPersistentVolumeClaim ¶
func (volume *VolumeDetails) SetupDynamicPersistentVolumeClaim(client clientset.Interface, namespace *v1.Namespace, csiDriver driver.DynamicPVTestDriver) (*TestPersistentVolumeClaim, []func())
func (*VolumeDetails) SetupPreProvisionedPersistentVolumeClaim ¶
func (volume *VolumeDetails) SetupPreProvisionedPersistentVolumeClaim(client clientset.Interface, namespace *v1.Namespace, csiDriver driver.PreProvisionedVolumeTestDriver) (*TestPersistentVolumeClaim, []func())
type VolumeDeviceDetails ¶ added in v0.3.0
type VolumeMountDetails ¶
Source Files ¶
- dynamically_provisioned_cmd_volume_tester.go
- dynamically_provisioned_collocated_pod_tester.go
- dynamically_provisioned_delete_pod_tester.go
- dynamically_provisioned_read_only_volume_tester.go
- dynamically_provisioned_reclaim_policy_tester.go
- dynamically_provisioned_resize_volume_tester.go
- dynamically_provisioned_topology_aware_volume_tester.go
- dynamically_provisioned_volume_snapshot_tester.go
- pre_provisioned_read_only_volume_tester.go
- pre_provisioned_reclaim_policy_tester.go
- pre_provisioned_snapshot_volume_tester.go
- pre_provisioned_volume_tester.go
- specs.go
- testsuites.go