Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Introduce MODE and TARGET for E2E tests #2673

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,16 @@ GINKGO_FOCUS ?=
GINKGO_SKIP ?=
GINKGO_NODES ?= 1
GINKGO_TIMEOUT ?= 3h
E2E_CONF_FILE ?= $(abspath test/e2e/config/vsphere-dev.yaml)
E2E_CONF_FILE ?= $(abspath test/e2e/config/vsphere.yaml)
E2E_CONF_OVERRIDE_FILE ?= $(abspath test/e2e/config/config-overrides.yaml)
E2E_CAPV_MODE ?= govmomi
E2E_TARGET_TYPE ?= vcenter
E2E_IPAM_KUBECONFIG ?=
INTEGRATION_CONF_FILE ?= $(abspath test/integration/integration-dev.yaml)
E2E_TEMPLATE_DIR := $(abspath test/e2e/data/infrastructure-vsphere/)
SKIP_RESOURCE_CLEANUP ?= false
USE_EXISTING_CLUSTER ?= false
GINKGO_NOCOLOR ?= false
E2E_IPAM_KUBECONFIG ?=

# to set multiple ginkgo skip flags, if any
ifneq ($(strip $(GINKGO_SKIP)),)
Expand Down Expand Up @@ -530,9 +533,12 @@ e2e: $(GINKGO) $(KUSTOMIZE) $(KIND) $(GOVC) ## Run e2e tests
time $(GINKGO) -v --trace -focus="$(GINKGO_FOCUS)" $(_SKIP_ARGS) --nodes=$(GINKGO_NODES) -timeout=$(GINKGO_TIMEOUT) \
--output-dir="$(ARTIFACTS)" --junit-report="junit.e2e_suite.1.xml" ./test/e2e -- \
--e2e.config="$(E2E_CONF_FILE)" \
--e2e.config-overrides="$(E2E_CONF_OVERRIDE_FILE)" \
--e2e.artifacts-folder="$(ARTIFACTS)" \
--e2e.skip-resource-cleanup=$(SKIP_RESOURCE_CLEANUP) \
--e2e.use-existing-cluster="$(USE_EXISTING_CLUSTER)" \
--e2e.capv-mode="$(E2E_CAPV_MODE)" \
--e2e.target-type="$(E2E_TARGET_TYPE)" \
--e2e.ipam-kubeconfig="$(E2E_IPAM_KUBECONFIG)"

## --------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/release/release-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This comes down to changing occurrences of the old version to the new version, e
1. Goal is that our clusterctl upgrade tests are testing the right versions. For `v1.8` this means:
- v1beta1: `v1.8` (will change with each new release)
- v1beta1: `v1.7` (will change with each new release)
2. Update providers in `vsphere-ci.yaml`, `vsphere-dev.yaml`, `integration-dev.yaml`:
2. Update providers in `vsphere.yaml`, `integration-dev.yaml`:
1. Add a new `v1.7.0` entry.
2. Remove providers that are not used anymore in clusterctl upgrade tests.
3. Change `v1.7.99` to `v1.8.99`.
Expand Down
5 changes: 4 additions & 1 deletion hack/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ export VSPHERE_USERNAME="${GOVC_USERNAME}"
export VSPHERE_PASSWORD="${GOVC_PASSWORD}"
export VSPHERE_SSH_AUTHORIZED_KEY="${VM_SSH_PUB_KEY}"
export VSPHERE_SSH_PRIVATE_KEY="/root/ssh/.private-key/private-key"
export E2E_CONF_FILE="${REPO_ROOT}/test/e2e/config/vsphere-ci.yaml"
export E2E_CONF_FILE="${REPO_ROOT}/test/e2e/config/vsphere.yaml"
export E2E_CONF_OVERRIDE_FILE=""
export E2E_CAPV_MODE="${CAPV_MODE:-govmomi}"
export E2E_TARGET_TYPE="${TARGET_TYPE:-vmc}"
export ARTIFACTS="${ARTIFACTS:-${REPO_ROOT}/_artifacts}"
export DOCKER_IMAGE_TAR="/tmp/images/image.tar"
export GC_KIND="false"
Expand Down
36 changes: 36 additions & 0 deletions test/e2e/config/config-overrides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
fabriziopandini marked this conversation as resolved.
Show resolved Hide resolved
# This e2e config file contains an example of overrides for a tests targeting a user provided vCenter instance.
# Those overrides will be applied on top of the content of the config file used for CI (only variables and intervals are considered)

variables:
# Change following values with the info about the user provided vCenter instance (current values are just examples)
VSPHERE_SERVER: "vcenter.vmware.com"
VSPHERE_TLS_THUMBPRINT: "AA:BB:CC:DD:11:22:33:44:EE:FF"
VSPHERE_DATACENTER: "SDDC-Datacenter"
VSPHERE_COMPUTE_CLUSTER: "cluster0"
VSPHERE_FOLDER: "FolderName"
VSPHERE_RESOURCE_POOL: "ResourcePool"
VSPHERE_DATASTORE: "WorkloadDatastore"
VSPHERE_STORAGE_POLICY: "Cluster API vSphere Storage Policy"
VSPHERE_NETWORK: "network-1"
VSPHERE_TEMPLATE: "ubuntu-2204-kube-v1.29.0"
FLATCAR_VSPHERE_TEMPLATE: "flatcar-stable-3602.2.3-kube-v1.29.0"
CONTROL_PLANE_ENDPOINT_IP: "10.0.0.10"
# Only for clusterctl upgrade tests
# WORKLOAD_CONTROL_PLANE_ENDPOINT_IP:
# Also following variables are required but it is recommended to use env variables to avoid disclosure of sensitive data
# VSPHERE_SSH_AUTHORIZED_KEY:
# VSPHERE_PASSWORD:
# VSPHERE_USERNAME:

# Only for multivc_test info about a second user provided vCenter instance must be provided
VSPHERE2_SERVER: "vcenter2.vmware.com"
VSPHERE2_TLS_THUMBPRINT: "AA:BB:CC:DD:11:22:33:44:EE:FF"
VSPHERE2_RESOURCE_POOL: "ResourcePool"
VSPHERE2_TEMPLATE: "ubuntu-2204-kube-v1.29.0"
VSPHERE2_CONTROL_PLANE_ENDPOINT_IP: "10.0.0.11"
# Also following variables are required but it is recommended to use env variables to avoid disclosure of sensitive data
# VSPHERE2_USERNAME:
# VSPHERE2_PASSWORD:

intervals:
221 changes: 0 additions & 221 deletions test/e2e/config/vsphere-dev.yaml

This file was deleted.

File renamed without changes.
Loading
Loading