Skip to content

Commit

Permalink
Add instructions to run vSphere e2e tests locally
Browse files Browse the repository at this point in the history
Signed-off-by: Furkat Gofurov <[email protected]>
  • Loading branch information
furkatgofurov7 committed Jan 6, 2024
1 parent 9b20f48 commit 1e1ad6c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .envrc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export VSPHERE_TLS_THUMBPRINT=""
export VSPHERE_DATACENTER=""
export VSPHERE_DATASTORE=""
export VSPHERE_FOLDER=""
export VSPHERE_NETWORK=""
export VSPHERE_SERVER=""
export VSPHERE_TEMPLATE=""
export VSPHERE_PASSWORD=""
export VSPHERE_USERNAME=""
export VSPHERE_SSH_AUTHORIZED_KEY=""
export CONTROL_PLANE_ENDPOINT_IP=""
export KUBERNETES_VERSION=""
export CPI_IMAGE_K8S_VERSION=""
export EXP_CLUSTER_RESOURCE_SET="true/false"
export GOVC_URL=""
export GOVC_USERNAME=""
export GOVC_PASSWORD=""
export GOVC_INSECURE="true/false"
23 changes: 23 additions & 0 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export RANCHER_HOSTNAME=<YOUR_DOMAIN_NAME>

Now you are ready to start your e2e test run.

**Note:** If you want to run vSphere e2e tests locally, please refer to the instructions provided in the [Running vSphere e2e tests locally](#running-vsphere-e2e-tests-locally) section.

Additionally, you could reuse [`go.work.example`](../../go.work.example) and copy it into `rancher-turtles/../go.work` to allow linting in tests. Be aware that this may break vendoring process used for `make test` task due to incompatibility between the two. You will need to add `e2e` to build tags in your IDE of choice for the imports in the test suite to become resolvable.

### Running the tests
Expand All @@ -39,6 +41,27 @@ This will consequently:
4. Create the test cluster, run the test suite, cleanup all test resourses.
5. Collect the [artifacts](#artifacts)

### Running vSphere e2e tests locally

#### Prerequisites

1. Initiate a VPN connection using a client such as OpenVPN or Cisco AnyConnect Secure Mobility Client.
1. Set up all the necessary environment variables. You can start with the [`.envrc.example`](../../.envrc.example) file.
Use [direnv] (https://direnv.net/) to load these variables into your shell. Rename the file and modify the values as required.
You can obtain these values from a team common credentials shared location.

#### Running the tests

From the project root directory:

```bash
make test-e2e GINKGO_LABEL_FILTER=local
```

**Important note:** The vSphere e2e tests require a VPN connection, which makes their integration into the daily e2e CI job challenging. Therefore,
team members should run these tests locally every two weeks. By this, it can ensured that the tests remain functional and up-to-date over the
time.

## Architecture

### E2E config
Expand Down

0 comments on commit 1e1ad6c

Please sign in to comment.