Skip to content

doc: update e2e-tests.md to clarify steps running delve locally without GCE #8535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions contributors/devel/sig-testing/e2e-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,22 +287,27 @@ First, compile the E2E test suite with additional compiler flags
make WHAT=test/e2e/e2e.test DBG=1
```

Then set the env var `E2E_TEST_DEBUG_TOOL=delve` and then run the test with `./hack/ginkgo.sh` instead of `kubetest`, you should see the delve command line prompt
Then set the env var `E2E_TEST_DEBUG_TOOL=delve` `KUBERNETES_CONFORMANCE_TEST=y` and then run the test with `./hack/ginkgo.sh` instead of `kubetest`, you should see the delve command line prompt

```sh
E2E_TEST_DEBUG_TOOL=delve ./hack/ginkgo-e2e.sh --ginkgo.focus="sig-storage.*csi-hostpath.*Dynamic.PV.*default.fs.*provisioning.should.provision.storage.with.snapshot.data.source" --allowed-not-ready-nodes=10
E2E_TEST_DEBUG_TOOL=delve KUBERNETES_CONFORMANCE_TEST=y ./hack/ginkgo-e2e.sh --ginkgo.focus="sig-storage.*csi-hostpath.*Dynamic.PV.*default.fs.*provisioning.should.provision.storage.with.snapshot.data.source" --allowed-not-ready-nodes=10
---
Conformance test: not doing test setup.
API server listening at: [::]:2345
2025-07-30T22:32:10+08:00 warn layer=rpc Listening for remote connections (connections are not authenticated nor encrypted)
```

Open another terminal and use `delve` to attach the e2e executable. If everything is fine, you should see the `delve` console

```sh
dlv connect 127.0.0.1:2345
---
Setting up for KUBERNETES_PROVIDER="gce".
Project: ...
Network Project: ...
Zone: ...
Trying to find master named '...'
Looking for address '...'
Using master: ... (external IP: XX.XXX.XXX.XX; internal IP: (not set))
Type 'help' for list of commands.
(dlv)
```

The default listening port of `delve` debugger is 2345 according to the official doc. You could modify the behavior by declaring `DELVE_PORT` environment variable when running `ginkgo-e2e.sh`.

Use the commands described in the [delve command lists](https://github.com/go-delve/delve/blob/master/Documentation/cli/README.md), for our example we'll set a breakpoint at the start of the method

```sh
Expand Down