8000 kro/test/SETUP.md at main · muahmed471/kro · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1007 Bytes

SETUP.md

File metadata and controls

41 lines (27 loc) · 1007 Bytes

Setup Guide for Envtest

Install setup-envtest tool

First install the setup-envtest tool:

go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

Download Kubebuilder assets

Use setup-envtest to download the Kubebuilder assets:

setup-envtest use -p path <version> 

Replace <version> with the Kubernetes version you want to test against, for example, 1.31.x. The -p path flag will print the path where the assets are stored.

Set environment variable

Set the KUBEBUILDER_ASSETS environment variable to the path printed by the previous command:

export KUBEBUILDER_ASSETS=/path/to/kubebuilder/assets

You may want to add this to your shells configuration file (e.g ~/.bashrc or ~/.zshrc) to make it permanent.

Run the tests

make test WHAT=integration

If you're still encountering issues, make sure the KUBEBUILDER_ASSETS environment variable is correctly set and points to a directory containing the etcd binary.

0