From 6e0803a4b76ffcb0a877ff9d5a79a1b4c44bcd29 Mon Sep 17 00:00:00 2001 From: nasusoba Date: Thu, 14 Mar 2024 16:29:31 +0800 Subject: [PATCH] update --- test/e2e/README.md | 15 ++++++++++++--- test/e2e/config/k3s-docker.yaml | 11 ++++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/test/e2e/README.md b/test/e2e/README.md index 8273c4c8..ed0e1261 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -8,10 +8,19 @@ You could refer to the [Testing Cluster API](https://cluster-api.sigs.k8s.io/dev make docker-build-e2e # should be run everytime you change the controller code make test-e2e # run all e2e tests ``` +### Run a specific e2e test To run a specific e2e test, you can use the `GINKGO_FOCUS` environment variable to specify the test you want to run. For example: ```shell -make test-e2e GINKGO_FOCUS="Creating a cluster" +make GINKGO_FOCUS="Creating a cluster" test-e2e # only run the "Creating a cluster" e2e test +``` +### Run the e2e test with tilt +It is quite useful to run the e2e test with [tilt](https://cluster-api.sigs.k8s.io/developer/tilt), so that you will not need to rebuild docker image with `make docker-build-e2e` everytime. Also you will not need to wait a new cluster creation and setup. If you set up your tilt cluster with name and current context points to this cluster, you could run: +```shell +# running e2e for the cluster pointed by the current context +make USE_EXISTING_CLUSTER=true test-e2e ``` -Also it is quite useful to run the e2e test with [tilt](https://cluster-api.sigs.k8s.io/developer/tilt), so that you will not need to rebuild docker image with makefile everytime. ## Develop an e2e test -You could refer to [Developing E2E tests](https://cluster-api.sigs.k8s.io/developer/e2e) for a complete guide for developing e2e tests. \ No newline at end of file +You could refer to [Developing E2E tests](https://cluster-api.sigs.k8s.io/developer/e2e) for a complete guide for developing e2e tests. + +## Troubleshooting +* [Cluster API with Docker - "too many open files".](https://cluster-api.sigs.k8s.io/user/troubleshooting.html?highlight=too%20many#cluster-api-with-docker----too-many-open-files) \ No newline at end of file diff --git a/test/e2e/config/k3s-docker.yaml b/test/e2e/config/k3s-docker.yaml index d9f3bae4..1dced041 100644 --- a/test/e2e/config/k3s-docker.yaml +++ b/test/e2e/config/k3s-docker.yaml @@ -28,7 +28,7 @@ providers: - name: docker type: InfrastructureProvider versions: - - name: v1.6.2 + - name: v1.6.2 # used during e2e-test value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.2/infrastructure-components-development.yaml type: url files: @@ -36,6 +36,15 @@ providers: replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" + - name: v1.7.99 # next; use manifest from source files + # added to support tilt + value: https://github.com/kubernetes-sigs/cluster-api/releases/latest/download/infrastructure-components-development.yaml + type: url + files: + - sourcePath: "../data/shared/v1beta1/metadata.yaml" + replacements: + - old: "imagePullPolicy: Always" + new: "imagePullPolicy: IfNotPresent" files: - sourcePath: "../data/infrastructure-docker/cluster-template.yaml" - name: k3s