e2e

package
v1.23.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

README

E2E test for cloud-provider-vsphere

Requirements

In order to perform e2e tests against the cloud-provider-vsphere, make sure

  • you have administrative access to a vSphere server
  • golang 1.16+
  • Docker (download)

Environment variables

The first step to running the e2e tests is setting up the required environment variables in the e2e config file:

Environment variable Description Example
VSPHERE_SERVER The IP address or FQDN of a vCenter 6.7u3 server (required) my.vcenter.com
VSPHERE_USERNAME The username used to access the vSphere server (required) my-username
VSPHERE_PASSWORD The password used to access the vSphere server (required) my-password
VSPHERE_DATACENTER The unique name or inventory path of the datacenter in which VMs will be created my-datacenter or /my-datacenter
VSPHERE_FOLDER The unique name or inventory path of the folder in which VMs will be created my-folder or /my-datacenter/vm/my-folder
VSPHERE_RESOURCE_POOL The unique name or inventory path of the resource pool in which VMs will be created my-resource-pool or /my-datacenter/host/Cluster-1/Resources/my-resource-pool
VSPHERE_DATASTORE The unique name or inventory path of the datastore in which VMs will be created my-datastore or /my-datacenter/datstore/my-datastore
VSPHERE_NETWORK The unique name or inventory path of the network to which VMs will be connected my-network or /my-datacenter/network/my-network
VSPHERE_HAPROXY_TEMPLATE The unique name or inventory path of the template from which the HAProxy load balancer VMs are cloned my-haproxy-template or /my-datacenter/vm/my-haproxy-template
VSPHERE_SSH_PRIVATE_KEY The file path of the private key used to ssh into the CAPV VMs /home/foo/bar-ssh.key
VSPHERE_SSH_AUTHORIZED_KEY The public key that is added to the CAPV VMs ss-rsa ABCDEF...XYZ=

Running the e2e tests

Checkout the e2e directory PROJECT_ROOT/test/e2e and run it with make.

Or run make test-e2e under the PROJECT_ROOT.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFieldNotFound = errors.New("field not found in the e2e config")

Functions

func NewVSphereClientConfigFromE2E

func NewVSphereClientConfigFromE2E(e *clusterctl.E2EConfig) (*vSphereClientConfig, error)

NewVSphereClientConfigFromE2E extracts a vSphereClientConfig from the cluster-api e2e config

Types

type VSphereClient

type VSphereClient interface {
}

func CreateVSphereTestClient

func CreateVSphereTestClient(ctx context.Context, e2eConfig *clusterctl.E2EConfig) (VSphereClient, error)

CreateVSphereTestClient creates an vSphereTestClient when config is provided

Jump to

Keyboard shortcuts

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