Documentation ¶
Index ¶
- Constants
- func CreateEmptyFileInBucket(fileName, bucketName string)
- func CreateImplicitDirInBucket(dirPath, bucketName string)
- func WaitForWorkloadReady(ctx context.Context, c clientset.Interface, namespace string, ...)
- type TestDeployment
- func (t *TestDeployment) Cleanup(ctx context.Context)
- func (t *TestDeployment) Create(ctx context.Context)
- func (t *TestDeployment) Scale(ctx context.Context, replica int)
- func (t *TestDeployment) SetReplicas(replica int)
- func (t *TestDeployment) WaitForRunningAndReady(ctx context.Context)
- func (t *TestDeployment) WaitForRunningAndReadyWithTimeout(ctx context.Context, timeout time.Duration)
- type TestGCPProjectIAMPolicyBinding
- type TestGCPServiceAccount
- type TestJob
- type TestKubernetesServiceAccount
- type TestPVC
- type TestPod
- func (t *TestPod) CheckSidecarNeverTerminated(ctx context.Context)
- func (t *TestPod) Cleanup(ctx context.Context)
- func (t *TestPod) Create(ctx context.Context)
- func (t *TestPod) GetNode() string
- func (t *TestPod) SetAnnotations(annotations map[string]string)
- func (t *TestPod) SetCommand(cmd string)
- func (t *TestPod) SetCustomSidecarContainerImage()
- func (t *TestPod) SetGracePeriod(s int)
- func (t *TestPod) SetImage(image string)
- func (t *TestPod) SetName(name string)
- func (t *TestPod) SetNodeAffinity(nodeName string, sameNode bool)
- func (t *TestPod) SetNodeSelector(nodeSelector map[string]string)
- func (t *TestPod) SetNonRootSecurityContext(uid, gid, fsgroup int)
- func (t *TestPod) SetPod(pod *v1.Pod)
- func (t *TestPod) SetResource(cpuLimit, memoryLimit, storageLimit string)
- func (t *TestPod) SetRestartPolicy(rp v1.RestartPolicy)
- func (t *TestPod) SetServiceAccount(sa string)
- func (t *TestPod) SetupVolume(volumeResource *storageframework.VolumeResource, name, mountPath string, ...)
- func (t *TestPod) SetupVolumeWithSubPath(volumeResource *storageframework.VolumeResource, name, mountPath string, ...)
- func (t *TestPod) VerifyCustomSidecarContainerImage()
- func (t *TestPod) VerifyExecInPodFail(f *framework.Framework, containerName, shExec string, exitCode int)
- func (t *TestPod) VerifyExecInPodSucceed(f *framework.Framework, containerName, shExec string)
- func (t *TestPod) VerifyExecInPodSucceedWithFullOutput(f *framework.Framework, containerName, shExec string)
- func (t *TestPod) WaitForFail(ctx context.Context, timeout time.Duration)
- func (t *TestPod) WaitForFailedMountError(ctx context.Context, msg string)
- func (t *TestPod) WaitForPodNotFoundInNamespace(ctx context.Context, timeout time.Duration)
- func (t *TestPod) WaitForRunning(ctx context.Context)
- func (t *TestPod) WaitForSuccess(ctx context.Context)
- func (t *TestPod) WaitForUnschedulable(ctx context.Context)
- type TestSecret
- type TestStatefulSet
Constants ¶
View Source
const ( TesterContainerName = "volume-tester" K8sServiceAccountName = "gcsfuse-csi-sa" //nolint:gosec K8sSecretName = "gcsfuse-csi-test-secret" FakeVolumePrefix = "gcsfuse-csi-fake-volume" InvalidVolumePrefix = "gcsfuse-csi-invalid-volume" NonRootVolumePrefix = "gcsfuse-csi-non-root-volume" InvalidMountOptionsVolumePrefix = "gcsfuse-csi-invalid-mount-options-volume" ImplicitDirsVolumePrefix = "gcsfuse-csi-implicit-dirs-volume" ForceNewBucketPrefix = "gcsfuse-csi-force-new-bucket" SubfolderInBucketPrefix = "gcsfuse-csi-subfolder-in-bucket" MultipleBucketsPrefix = "gcsfuse-csi-multiple-buckets" ImplicitDirsPath = "implicit-dir" InvalidVolume = "<invalid-name>" GoogleCloudCliImage = "gcr.io/google.com/cloudsdktool/google-cloud-cli:slim" UbuntuImage = "ubuntu:20.04" LastPublishedSidecarContainerImage = "" /* 126-byte string literal not displayed */ PollInterval = 1 * time.Second PollTimeout = 1 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func CreateEmptyFileInBucket ¶ added in v0.1.5
func CreateEmptyFileInBucket(fileName, bucketName string)
func CreateImplicitDirInBucket ¶ added in v0.1.5
func CreateImplicitDirInBucket(dirPath, bucketName string)
func WaitForWorkloadReady ¶ added in v0.1.7
func WaitForWorkloadReady(ctx context.Context, c clientset.Interface, namespace string, selector *metav1.LabelSelector, replica int32, expectedPodStatus v1.PodPhase, timeout time.Duration)
WaitForWorkloadReady waits for the pods in the workload to reach the expected status.
Types ¶
type TestDeployment ¶ added in v0.1.1
type TestDeployment struct {
// contains filtered or unexported fields
}
func NewTestDeployment ¶ added in v0.1.1
func (*TestDeployment) Cleanup ¶ added in v0.1.1
func (t *TestDeployment) Cleanup(ctx context.Context)
func (*TestDeployment) Create ¶ added in v0.1.1
func (t *TestDeployment) Create(ctx context.Context)
func (*TestDeployment) Scale ¶ added in v0.1.14
func (t *TestDeployment) Scale(ctx context.Context, replica int)
func (*TestDeployment) SetReplicas ¶ added in v0.1.14
func (t *TestDeployment) SetReplicas(replica int)
func (*TestDeployment) WaitForRunningAndReady ¶ added in v0.1.7
func (t *TestDeployment) WaitForRunningAndReady(ctx context.Context)
func (*TestDeployment) WaitForRunningAndReadyWithTimeout ¶ added in v0.1.14
func (t *TestDeployment) WaitForRunningAndReadyWithTimeout(ctx context.Context, timeout time.Duration)
type TestGCPProjectIAMPolicyBinding ¶
type TestGCPProjectIAMPolicyBinding struct {
// contains filtered or unexported fields
}
func NewTestGCPProjectIAMPolicyBinding ¶
func NewTestGCPProjectIAMPolicyBinding(projectID, member, role, condition string) *TestGCPProjectIAMPolicyBinding
func (*TestGCPProjectIAMPolicyBinding) Cleanup ¶
func (t *TestGCPProjectIAMPolicyBinding) Cleanup(ctx context.Context)
func (*TestGCPProjectIAMPolicyBinding) Create ¶
func (t *TestGCPProjectIAMPolicyBinding) Create(ctx context.Context)
type TestGCPServiceAccount ¶
type TestGCPServiceAccount struct {
// contains filtered or unexported fields
}
func NewTestGCPServiceAccount ¶
func NewTestGCPServiceAccount(name, projectID string) *TestGCPServiceAccount
func (*TestGCPServiceAccount) AddIAMPolicyBinding ¶ added in v0.1.4
func (t *TestGCPServiceAccount) AddIAMPolicyBinding(ctx context.Context, ns *v1.Namespace)
func (*TestGCPServiceAccount) Cleanup ¶
func (t *TestGCPServiceAccount) Cleanup(ctx context.Context)
func (*TestGCPServiceAccount) Create ¶
func (t *TestGCPServiceAccount) Create(ctx context.Context)
func (*TestGCPServiceAccount) GetEmail ¶ added in v0.1.4
func (t *TestGCPServiceAccount) GetEmail() string
type TestJob ¶ added in v0.1.1
type TestJob struct {
// contains filtered or unexported fields
}
func NewTestJob ¶ added in v0.1.1
func (*TestJob) WaitForAllJobPodsGone ¶ added in v1.0.0
func (*TestJob) WaitForJobFailed ¶ added in v0.1.14
func (t *TestJob) WaitForJobFailed()
func (*TestJob) WaitForJobPodsSucceeded ¶ added in v0.1.1
type TestKubernetesServiceAccount ¶
type TestKubernetesServiceAccount struct {
// contains filtered or unexported fields
}
func (*TestKubernetesServiceAccount) Cleanup ¶
func (t *TestKubernetesServiceAccount) Cleanup(ctx context.Context)
func (*TestKubernetesServiceAccount) Create ¶
func (t *TestKubernetesServiceAccount) Create(ctx context.Context)
type TestPVC ¶ added in v0.1.13
type TestPVC struct { PVC *v1.PersistentVolumeClaim // contains filtered or unexported fields }
func NewTestPVC ¶ added in v0.1.13
type TestPod ¶
type TestPod struct {
// contains filtered or unexported fields
}
func (*TestPod) CheckSidecarNeverTerminated ¶ added in v1.0.0
func (*TestPod) SetAnnotations ¶
func (*TestPod) SetCommand ¶
func (*TestPod) SetCustomSidecarContainerImage ¶ added in v0.1.9
func (t *TestPod) SetCustomSidecarContainerImage()
func (*TestPod) SetGracePeriod ¶ added in v0.1.14
func (*TestPod) SetNodeAffinity ¶ added in v0.1.4
func (*TestPod) SetNodeSelector ¶
func (*TestPod) SetNonRootSecurityContext ¶
func (*TestPod) SetResource ¶ added in v0.1.4
func (*TestPod) SetRestartPolicy ¶ added in v0.1.3
func (t *TestPod) SetRestartPolicy(rp v1.RestartPolicy)
func (*TestPod) SetServiceAccount ¶
func (*TestPod) SetupVolume ¶
func (t *TestPod) SetupVolume(volumeResource *storageframework.VolumeResource, name, mountPath string, readOnly bool, mountOptions ...string)
func (*TestPod) SetupVolumeWithSubPath ¶ added in v0.1.5
func (t *TestPod) SetupVolumeWithSubPath(volumeResource *storageframework.VolumeResource, name, mountPath string, readOnly bool, subPath string, reuseMount bool, mountOptions ...string)
func (*TestPod) VerifyCustomSidecarContainerImage ¶ added in v0.1.9
func (t *TestPod) VerifyCustomSidecarContainerImage()
func (*TestPod) VerifyExecInPodFail ¶
func (t *TestPod) VerifyExecInPodFail(f *framework.Framework, containerName, shExec string, exitCode int)
VerifyExecInPodFail verifies shell cmd in target pod fail with certain exit code.
func (*TestPod) VerifyExecInPodSucceed ¶
VerifyExecInPodSucceed verifies shell cmd in target pod succeed.
func (*TestPod) VerifyExecInPodSucceedWithFullOutput ¶ added in v0.1.4
func (t *TestPod) VerifyExecInPodSucceedWithFullOutput(f *framework.Framework, containerName, shExec string)
VerifyExecInPodSucceedWithFullOutput verifies shell cmd in target pod succeed with full output.
func (*TestPod) WaitForFail ¶ added in v1.0.0
func (*TestPod) WaitForFailedMountError ¶
func (*TestPod) WaitForPodNotFoundInNamespace ¶ added in v0.1.14
func (*TestPod) WaitForRunning ¶
func (*TestPod) WaitForSuccess ¶
func (*TestPod) WaitForUnschedulable ¶ added in v0.1.1
type TestSecret ¶
type TestSecret struct {
// contains filtered or unexported fields
}
func NewTestSecret ¶
func (*TestSecret) Cleanup ¶
func (t *TestSecret) Cleanup(ctx context.Context)
func (*TestSecret) Create ¶
func (t *TestSecret) Create(ctx context.Context)
type TestStatefulSet ¶ added in v0.1.7
type TestStatefulSet struct {
// contains filtered or unexported fields
}
func NewTestStatefulSet ¶ added in v0.1.7
func (*TestStatefulSet) Cleanup ¶ added in v0.1.7
func (t *TestStatefulSet) Cleanup(ctx context.Context)
func (*TestStatefulSet) Create ¶ added in v0.1.7
func (t *TestStatefulSet) Create(ctx context.Context)
func (*TestStatefulSet) WaitForRunningAndReady ¶ added in v0.1.7
func (t *TestStatefulSet) WaitForRunningAndReady(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.