Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
komer3 committed May 2, 2024
1 parent ca51ab6 commit a6c0bc9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/src/developers/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

- [Unit Tests](#unit-tests)
- [Executing Tests](#executing-tests)
- [Creating tests](#creating-tests)
- [Creating Tests](#creating-tests)
- [E2E Tests](#e2e-tests)
- [Running tests](#running-tests)
- [Adding tests](#adding-tests)
- [Running Tests](#running-tests)
- [Adding Tests](#adding-tests)

<!-- /TOC -->

Expand All @@ -17,7 +17,7 @@ In order to run the unit tests run the following command
```bash
make test
```
### Creating tests
### Creating Tests
General unit tests of functions follow the same conventions for testing using Go's `testing` standard library, along with the [testify](https://github.com/stretchr/testify) toolkit for making assertions.

Unit tests that require API clients use mock clients generated using [gomock](https://github.com/uber-go/mock). To simplify the usage of mock clients, this repo also uses an internal library defined in `mock/mocktest`.
Expand Down Expand Up @@ -189,7 +189,7 @@ For e2e tests CAPL uses the [Chainsaw project](https://kyverno.github.io/chainsa
spin up a cluster with the CAPL controllers installed and then uses `chainsaw-test.yaml` files to drive e2e testing.

All test live in the e2e folder with a directory structure of `e2e/${COMPONENT}/${TEST_NAME}`
### Running tests
### Running Tests
In order to run e2e tests run the following commands:
```bash
# Required env vars to run e2e tests
Expand Down Expand Up @@ -231,7 +231,7 @@ There are other selectors you can use to invoke specfic tests. Please look at th

*Note: For any flavor e2e tests, please set the required env variables*

### Adding tests
### Adding Tests
1. Create a new directory under the controller you are testing with the naming scheme of `e2e/${COMPONENT}/${TEST_NAME}`
2. Create a minimal `chainsaw-test.yaml` file in the new test dir
```yaml
Expand Down

0 comments on commit a6c0bc9

Please sign in to comment.