e2e

package module
v0.0.0-...-3ac7374 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 11 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

This section is empty.

Functions

This section is empty.

Types

type VSphereTestClient

type VSphereTestClient struct {
	Client     *govmomi.Client
	Manager    *view.Manager
	Finder     *find.Finder
	Datacenter *object.Datacenter
}

VSphereTestClient defines a VSphere client for e2e testing

Jump to

Keyboard shortcuts

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