File tree Expand file tree Collapse file tree 4 files changed +51
-0
lines changed Expand file tree Collapse file tree 4 files changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Developer Guide
2
+
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
+ ### Run test in shell
21
+ ``` shell
22
+ export KUBEBUILDER_ASSETS=< project-root-path> /bin/k8s/1.31.0-< platform-architecture>
23
+ go test sigs.k8s.io/gateway-api-inference-extension/test/integration/epp -run < test-function-name>
24
+ ```
25
+
26
+ ### Configure and Run in GoLand
27
+
28
+ #### 1. Create Test Configuration
29
+ Select the test case you want to debug:
30
+ ![ ] ( ../images/modify-run-configuration.png )
31
+
32
+ #### 2. Configure Environment Variables
33
+ Set environment variables in the Run/Debug Configuration:
34
+
35
+ ![ ] ( ../images/edit-environment-variables.png )
36
+
37
+ ** Required environment variable:**
38
+
39
+ - ** Name:** ` KUBEBUILDER_ASSETS `
40
+ - ** Value:** ` <project-root-path>/bin/k8s/1.31.0-<platform-architecture> `
41
+
42
+ ** Example path:**
43
+ ```
44
+ /go/src/kubernetes.io/gateway-api-inference-extension/bin/k8s/1.31.0-darwin-arm64
45
+ ```
46
+
47
+ #### 3. Set Breakpoints and Run
48
+
49
+ Example Output:
50
+
51
+ ![ ] ( ../images/running-example.png )
You can’t perform that action at this time.
0 commit comments