specs

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

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"
)

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)

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 NewTestDeployment(c clientset.Interface, ns *v1.Namespace, tPod *TestPod) *TestDeployment

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) WaitForRunningAndReady added in v0.1.7

func (t *TestDeployment) WaitForRunningAndReady(ctx context.Context)

type TestGCPProjectIAMPolicyBinding

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

func NewTestGCPProjectIAMPolicyBinding

func NewTestGCPProjectIAMPolicyBinding(projectID, member, role, condition string) *TestGCPProjectIAMPolicyBinding

func (*TestGCPProjectIAMPolicyBinding) Cleanup

func (*TestGCPProjectIAMPolicyBinding) Create

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 NewTestJob(c clientset.Interface, ns *v1.Namespace, tPod *TestPod) *TestJob

func (*TestJob) Cleanup added in v0.1.1

func (t *TestJob) Cleanup(ctx context.Context)

func (*TestJob) Create added in v0.1.1

func (t *TestJob) Create(ctx context.Context)

func (*TestJob) WaitForJobPodsSucceeded added in v0.1.1

func (t *TestJob) WaitForJobPodsSucceeded(ctx context.Context)

type TestKubernetesServiceAccount

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

func NewTestKubernetesServiceAccount

func NewTestKubernetesServiceAccount(c clientset.Interface, ns *v1.Namespace, name, gcpSAEmail string) *TestKubernetesServiceAccount

func (*TestKubernetesServiceAccount) Cleanup

func (*TestKubernetesServiceAccount) Create

type TestPod

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

func NewTestPod

func NewTestPod(c clientset.Interface, ns *v1.Namespace) *TestPod

func (*TestPod) Cleanup

func (t *TestPod) Cleanup(ctx context.Context)

func (*TestPod) Create

func (t *TestPod) Create(ctx context.Context)

func (*TestPod) GetNode added in v0.1.1

func (t *TestPod) GetNode() string

func (*TestPod) SetAnnotations

func (t *TestPod) SetAnnotations(annotations map[string]string)

func (*TestPod) SetCommand

func (t *TestPod) SetCommand(cmd string)

func (*TestPod) SetImage added in v0.1.4

func (t *TestPod) SetImage(image string)

func (*TestPod) SetName

func (t *TestPod) SetName(name string)

func (*TestPod) SetNodeAffinity added in v0.1.4

func (t *TestPod) SetNodeAffinity(nodeName string, sameNode bool)

func (*TestPod) SetNodeSelector

func (t *TestPod) SetNodeSelector(nodeSelector map[string]string)

func (*TestPod) SetNonRootSecurityContext

func (t *TestPod) SetNonRootSecurityContext(uid, gid, fsgroup int)

func (*TestPod) SetPod added in v0.1.1

func (t *TestPod) SetPod(pod *v1.Pod)

func (*TestPod) SetResource added in v0.1.4

func (t *TestPod) SetResource(cpuLimit, memoryLimit, storageLimit string)

func (*TestPod) SetRestartPolicy added in v0.1.3

func (t *TestPod) SetRestartPolicy(rp v1.RestartPolicy)

func (*TestPod) SetServiceAccount

func (t *TestPod) SetServiceAccount(sa string)

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) 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

func (t *TestPod) VerifyExecInPodSucceed(f *framework.Framework, containerName, shExec string)

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) WaitFoSuccess added in v0.1.3

func (t *TestPod) WaitFoSuccess(ctx context.Context)

func (*TestPod) WaitForFailedMountError

func (t *TestPod) WaitForFailedMountError(ctx context.Context, msg string)

func (*TestPod) WaitForRunning

func (t *TestPod) WaitForRunning(ctx context.Context)

func (*TestPod) WaitForUnschedulable added in v0.1.1

func (t *TestPod) WaitForUnschedulable(ctx context.Context)

type TestSecret

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

func NewTestSecret

func NewTestSecret(c clientset.Interface, ns *v1.Namespace, name string, data map[string]string) *TestSecret

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 NewTestStatefulSet(c clientset.Interface, ns *v1.Namespace, tPod *TestPod) *TestStatefulSet

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)

Jump to

Keyboard shortcuts

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