Skip to content

Commit edc7f50

Browse files
committed
move to dev guide
Signed-off-by: zhengkezhou1 <[email protected]>
1 parent 72d1aff commit edc7f50

File tree

2 files changed

+44
-44
lines changed

2 files changed

+44
-44
lines changed

site-src/contributing/debug-with-integration-test.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

site-src/contributing/devguide.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
11
# Developer Guide
22

3-
TODO
3+
## Integration Tests Debug Guide
4+
This document provides detailed instructions on how to run and debug integration tests locally in debug mode.
5+
6+
### Prerequisites
7+
8+
#### 1. Install Required Tools
9+
Ensure the envtest tool is installed:
10+
```bash
11+
$ make envtest
12+
```
13+
14+
#### 2. Verify Kubernetes Test Environment
15+
Run the following command to set up and verify the test environment:
16+
```bash
17+
$ ./bin/setup-envtest use 1.31.0 --bin-dir ./bin -p path
18+
bin/k8s/1.31.0-darwin-arm64
19+
```
20+
21+
### Configure and Run in GoLand
22+
23+
#### 1. Create Test Configuration
24+
Select the test case you want to debug:
25+
![](../images/modify-run-configuration.png)
26+
27+
#### 2. Configure Environment Variables
28+
Set environment variables in the Run/Debug Configuration:
29+
30+
![](../images/edit-environment-variables.png)
31+
32+
**Required environment variable:**
33+
34+
- **Name:** `KUBEBUILDER_ASSETS`
35+
- **Value:** `<project-root-path>/bin/k8s/1.31.0-<platform-architecture>`
36+
37+
**Example path:**
38+
```
39+
/Users/zhengkezhou/go/src/kubernetes.io/gateway-api-inference-extension/bin/k8s/1.31.0-darwin-arm64
40+
```
41+
42+
#### 3. Set Breakpoints and Run
43+
44+
Example Output:
45+
46+
![](../images/running-example.png)

0 commit comments

Comments
 (0)