test

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

README

E2E tests

For insight into how the tests are run, you can check out .github/workflows/kind-e2e.yaml.

Setup

Before you begin, make sure you have your KO_DOCKER_REPO env var set to whatever registry you like to use.

To run the test, you'll need to upload the test images to a registry. This can be done by running upload-test-images.sh.

This document assumes you have already installed the Tanzu Sources, as described here

vCenter Simulator Image

By default, the tests use the vCenter Simulator image vmware/vcsim:latest, which is hosted on Dockerhub.

If you wish to use a vcsim image hosted on a different registry, you can build and store it yourself with ko, like this:

export VCSIM_IMAGE=$(ko publish -B github.com/vmware/govmomi/vcsim)

Running the tests

The tests can be run with go test, like this:

go test -v -race -count=1 -tags=e2e ./test/e2e

You can run a specific test with the -run flag, like this:

go test -v -race -count=1 -tags=e2e -run='^(TestSource)$' ./test/e2e

Documentation

Overview

Package test is modeled after the style of e2e testing performed in Knative upstream.

Index

Constants

View Source
const (
	// To simplify testing against our sample yamls, run our testing
	// in the default namespace.
	Namespace = "default"

	// PollInterval is how frequently e2e tests will poll for updates.
	PollInterval = 5 * time.Second
	// PollTimeout is how long e2e tests will wait for resource updates when polling.
	PollTimeout = 5 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Clients

type Clients struct {
	KubeClient   kubernetes.Interface
	VMWareClient *VMWareClients
	// contains filtered or unexported fields
}

func NewClients

func NewClients(configPath, clusterName, namespace string) (*Clients, error)

func NewClientsFromConfig

func NewClientsFromConfig(configPath, clusterName, namespace string) (*Clients, error)

func Setup

func Setup(t *testing.T) *Clients

func (*Clients) AsPluginClients added in v0.16.0

func (c *Clients) AsPluginClients() *clients.Clients

type VMWareClients

type VMWareClients struct {
	Bindings sources.VSphereBindingInterface
	Sources  sources.VSphereSourceInterface
	// contains filtered or unexported fields
}

Directories

Path Synopsis
test_images

Jump to

Keyboard shortcuts

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