Skip to content

Commit

Permalink
update readme and cleanup outdated sections
Browse files Browse the repository at this point in the history
  • Loading branch information
bschimke95 committed Jul 16, 2024
1 parent fdfb365 commit dd1abfa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 25 deletions.
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,3 @@ This repository contains bootstrap and control plane providers to deploy Canonic
CABPCK (Cluster API bootstrap provider for Canonical Kubernetes) is responsible for generate cloud-init scripts for generate Machines such that they run Kubernetes nodes. This implementation uses [Canonical Kubernetes](https://github.com/canonical/k8s-snap) to deliver Kubernetes.

CACPCK (Cluster API control plane provider for Canonical Kubernetes) is responsible for managing the lifecycle of machines that host the control plane nodes of a Canonical Kubernetes cluster.

## Tests

Run the unittests with

```shell
make test-unit
```

For the e2e tests, run:

```shell
make docker-build-e2e # run only once to build the images
make test-e2e
```

Visit the [tests README](./test/e2e/README.md) for more information.
19 changes: 11 additions & 8 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
# e2e test

The e2e test use the [Cluster API test framework](https://pkg.go.dev/sigs.k8s.io/cluster-api/test/framework?tab=doc) and use the [CAPD](https://github.com/kubernetes-sigs/cluster-api/tree/main/test/infrastructure/docker) as the infrastructure provider. Please make sure you have [Docker](https://docs.docker.com/install/) and [kind](https://kind.sigs.k8s.io/) installed.

You could refer to the [Testing Cluster API](https://cluster-api.sigs.k8s.io/developer/testing) for more information.
Refer to the [Testing Cluster API](https://cluster-api.sigs.k8s.io/developer/testing) for more information.

## Run the e2e test

The e2e image will be built with tag `dev`. You should build the image first before running the test.

```shell
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, such as `[PR-Blocking]`, use the `GINKGO_FOCUS` environment variable as shown below:

```shell
make GINKGO_FOCUS="\\[PR-Blocking\\]" test-e2e # only run e2e test with `[PR-Blocking]` in its spec name
```
### 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 have set up your tilt cluster and made the 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
```

## 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.

Refer to [Developing E2E tests](https://cluster-api.sigs.k8s.io/developer/e2e) for a complete guide for developing e2e tests.

A guide for developing a ck8s e2e test:

Expand All @@ -31,4 +33,5 @@ A guide for developing a ck8s e2e test:
* If reusing a [cluster-api test spec](https://github.com/kubernetes-sigs/cluster-api/tree/main/test/e2e), note that they assume the use of `KubeadmControlPlane`. For customization, copy code into `test/e2e/helpers.go`.

## 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)

0 comments on commit dd1abfa

Please sign in to comment.