e2e

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

README

Testing

This document is to help developers understand how to test CAPV.

e2e

This section illustrates how to do end-to-end (e2e) testing with CAPV.

Requirements

In order to run the e2e tests the following requirements must be met:

  • Administrative access to a vSphere server
  • The testing must occur on a host that can access the VMs deployed to vSphere via the network
  • Ginkgo (download)
  • Docker (download)
  • Kind v0.7.0+ (download)
Environment variables

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

Environment variable Description Example
VSPHERE_SERVER The IP address or FQDN of a vCenter 6.7u3 server my.vcenter.com
VSPHERE_USERNAME The username used to access the vSphere server my-username
VSPHERE_PASSWORD The password used to access the vSphere server 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

Run the following command to execute the CAPV e2e tests:

make e2e GC_KIND=false

The above command should build the CAPV manager image locally and use that image with the e2e test suite.

Documentation

Index

Constants

View Source
const (
	DefaultUserName           = "capv"
	VSpherePrivateKeyFilePath = "VSPHERE_SSH_PRIVATE_KEY"
)

Variables

This section is empty.

Functions

func Byf added in v0.7.0

func Byf(format string, a ...interface{})

Types

type LogCollector added in v0.8.0

type LogCollector struct{}

func (LogCollector) CollectMachineLog added in v0.8.0

func (collector LogCollector) CollectMachineLog(_ context.Context, _ client.Client, m *clusterv1.Machine, outputPath string) error

func (LogCollector) CollectMachinePoolLog added in v0.8.0

func (collector LogCollector) CollectMachinePoolLog(ctx context.Context, managementClusterClient client.Client, m *expv1.MachinePool, outputPath string) error

Jump to

Keyboard shortcuts

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