Skip to content

Commit caaa0a1

Browse files
rohanKanojiadkwon17
authored andcommitted
doc : add ginkgo prerequisite and running tests section
Add ginkgo to the prerequisites list as it's required for running tests locally. Also add a new \"Running Tests\" section that documents: - How to install ginkgo - How to ensure ginkgo is in PATH - How to run tests with make test - Note about ginkgo vs go test fallback behavior This addresses the missing documentation about test requirements for local development. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
1 parent f0a6374 commit caaa0a1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ To build, test and debug the DevWorkspace Operator the following development too
5353
- yq (python-yq from <https://github.com/kislyuk/yq#installation>, other distributions may not work)
5454
- skopeo (if building the OLM catalogsource)
5555
- podman or docker
56+
- ginkgo (required for running tests locally)
5657

5758
Note: kustomize `v4.0.5` is required for most tasks. It is downloaded automatically to the `.kustomize` folder in this
5859
repo when required. This downloaded version is used regardless of whether or not kustomize is already installed on the
@@ -258,6 +259,24 @@ when you are done debugging you have to manually uninstall the telepresence agen
258259
make disconnect-debug-webhook-server
259260
```
260261

262+
### Running Tests
263+
264+
To run tests locally, you need to have `ginkgo` installed. Install it using:
265+
266+
```bash
267+
go install github.com/onsi/ginkgo/v2/ginkgo@latest
268+
```
269+
270+
Ensure that `$GOPATH/bin` or `$GOBIN` is added to your `$PATH` so that `ginkgo` can be found.
271+
272+
Then run the tests:
273+
274+
```bash
275+
make test
276+
```
277+
278+
This will run all unit tests and controller tests. The Makefile will automatically use `ginkgo` if it's available in your `$PATH`, otherwise it will fall back to `go test` (though `ginkgo` is recommended for the full test suite).
279+
261280
### Updating devfile API
262281
263282
[devfile API](https://github.com/devfile/api) is the Kube-native API for cloud development workspaces specification and the core dependency of the devworkspace-operator that should be regularly updated to the latest version. In order to do the update:

0 commit comments

Comments
 (0)