e2e

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

README

E2E Testing

E2E tests verify the functionality of the EFS CSI driver in the context of Kubernetes.

Prerequisites

  • Amazon EFS file system
  • Kubernetes cluster, v1.22, whose workers (preferably 2 or more) can mount the Amazon EFS file system
  • Golang v1.11+

Presubmit Prow Jobs

We have Prow jobs defined in the Kubernetes test infrastructure repo that trigger the E2E tests to run on PRs against this repo. See aws-efs-csi-driver-presubmits.yaml.

These will jobs will execute various targets defined in our Makefile, such as test-e2e.

Trigger E2E Tests on a Local Cluster

If you have a v1.22 Kubernetes cluster, you can configure the E2E tests to execute against your cluster.

See the following example command which will build and deploy the csi driver to the cluster configured in your kube config, and then will execute E2E tests against your existing filesystem.

export KUBECONFIG=$HOME/.kube/config
go test -v -timeout 0 ./... -report-dir=$ARTIFACTS -ginkgo.focus="\[efs-csi\]" -ginkgo.skip="\[Disruptive\]" \
  --file-system-id=$FS_ID --create-file-system=false --deploy-driver=true --region=$REGION

The E2E flags that you can pass to go test are defined in e2e_test.go.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Parameters that are expected to be set by consumers of this package.
	ClusterName                 string
	Region                      string
	FileSystemId                string
	FileSystemName              string
	MountTargetSecurityGroupIds []string
	MountTargetSubnetIds        []string
	EfsDriverNamespace          string
	EfsDriverLabelSelectors     map[string]string

	// CreateFileSystem if set true will create a file system before tests.
	// Alternatively, provide an existing file system via FileSystemId. If this
	// is true, ClusterName and Region must be set. For CI it should be true
	// because there is no existing long-lived file system in the CI environment.
	CreateFileSystem bool

	// DeployDriver if set true will deploy a stable version of the driver before
	// tests. For CI it should be false because something else ought to deploy an
	// unstable version of the driver to be tested.
	DeployDriver bool
)

Functions

func GetStorageClass added in v1.7.0

func GetStorageClass(params map[string]string) *storagev1.StorageClass

func InitEFSCSIDriver added in v1.0.0

func InitEFSCSIDriver() storageframework.TestDriver

func NewCloud

func NewCloud(region string) *cloud

Types

type CreateOptions added in v1.1.0

type CreateOptions struct {
	Name             string
	ClusterName      string
	SecurityGroupIds []string
	SubnetIds        []string
}

Jump to

Keyboard shortcuts

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