From 53c7d3f3b13e3704cd2d4a7995c7df9c4b7a9dfe Mon Sep 17 00:00:00 2001 From: Frederic Giloux Date: Wed, 8 Dec 2021 18:38:18 +0100 Subject: [PATCH] Add instructions for setting up envtest and checking go version (#2504) Signed-off-by: Frederic Giloux --- DEVELOPMENT.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index f5cf2de211..5af612f371 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -27,6 +27,8 @@ This project uses the built-in testing support for golang. +Envtest is also used and needs to be set up. Follow [controller-runtime instructions] and set `KUBEBUILDER_ASSETS` environment variable to point to the installation directory, for instance: `/usr/local/kubebuilder/bin`. + To run the tests for all go packages outside of the vendor directory, run: ```sh $ make test @@ -46,11 +48,14 @@ To run a specific e2e test locally: $ make e2e-local TEST=TestCreateInstallPlanManualApproval ``` +[controller-runtime instructions]: https://pkg.go.dev/sigs.k8s.io/controller-runtime/tools/setup-envtest#section-readme + #### Building -Ensure your version of go is up to date; check that you're running v1.9 with the -command: +Ensure your version of go is up to date; check that you're running the same version as in go.mod with the +commands: ```sh +$ head go.mod $ go version ```