-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Configure ENVTEST Binaries for IDE Debugging (#1454)
This change introduces downloading the specific binaries required to run ENVTEST-based tests into the project/bin directory. This setup makes it easier to configure tests for debugging directly in an IDE. Furthermore, no longer install binaries required for ENVTEST based tests on the project/bin instead of global path.
1 parent
7ad65d6
commit d3f267a
Showing
3 changed files
with
67 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,32 @@ you can follow the steps below to test your changes: | |
make kind-load kind-deploy | ||
``` | ||
|
||
## How to debug controller tests using ENVTEST | ||
|
||
[ENVTEST](https://book.kubebuilder.io/reference/envtest) requires k8s binaries to be downloaded to run the tests. | ||
To download the necessary binaries, follow the steps below: | ||
|
||
```sh | ||
make envtest-k8s-bins | ||
``` | ||
|
||
Note that the binaries are downloaded to the `bin/envtest-binaries` directory. | ||
|
||
```sh | ||
$ tree | ||
. | ||
├── envtest-binaries | ||
│ └── k8s | ||
│ └── 1.31.0-darwin-arm64 | ||
│ ├── etcd | ||
│ ├── kube-apiserver | ||
│ └── kubectl | ||
``` | ||
|
||
Now, you can debug them with your IDE: | ||
|
||
![Screenshot IDE example](https://github.com/user-attachments/assets/3096d524-0686-48ca-911c-5b843093ad1f) | ||
|
||
### Communication Channels | ||
|
||
- Email: [operator-framework-olm-dev](mailto:[email protected]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters