Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Chandler <wchandler@gitlab.com>2022-06-23 06:04:50 +0300
committerWill Chandler <wchandler@gitlab.com>2022-06-23 16:37:16 +0300
commitc1ec6f9c3f19c97c94a62e926e84a491beb74441 (patch)
tree5a08ade1543093a832ce678bb834953aff2c28c6
parent996b5f1a27d22114aafe82eff505ef306f3d9a1d (diff)
doc: Document how to use debugger with testswc-debug-makefile
Add a section to the beginner's guide on how to use `dlv` to debug tests via the Makefile.
-rw-r--r--doc/beginners_guide.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/beginners_guide.md b/doc/beginners_guide.md
index a610aa2db..ab81e1c80 100644
--- a/doc/beginners_guide.md
+++ b/doc/beginners_guide.md
@@ -228,6 +228,17 @@ called on `testing.T`.
[require]: https://github.com/stretchr/testify/tree/master/require
[assert]: https://github.com/stretchr/testify/tree/master/assert
+##### Using Delve to debug a test
+
+The process to debug a test in your terminal using
+[Delve](https://github.com/go-delve/delve) is almost the same as
+[running a single test](#running-a-specific-test), just change the
+target to `debug-test-go`:
+
+```
+TEST_PACKAGES=./internal/gitaly/service/repository TEST_OPTIONS="-count=1 -run=TestRepositoryExists" make debug-test-go
+```
+
##### Useful snippets for creating a test
###### testhelper package