You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run or debug an embedded test on level 2 or more using run test | debug test button on top of t.Run statement, the extension passes a wrong path to the go tool and it returns with testing: warning: no tests to run.
Let's say I have 3 layer of tests as below. When I try to run Inner test, it executes the following command which ends up failing to find the correct test.
Running tool: /usr/local/bin/go test -timeout 5m -run ^Test$/^Inner_test$ github.com/emreisikligil/test -v
=== RUN Test
--- PASS: Test (0.00s)
testing: warning: no tests to run
PASS
ok github.com/emreisikligil/test 0.466s [no tests to run]
The expected behavior is to run the corresponding test.
If you are willing to use a prerelease verision of the Go extension, I recommend Go Companion as a workaround. It provides an improved testing experience (which will eventually be merged into the Go extension).
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.golang.org/x/tools/gopls v0.17.1
golang.org/x/tools/[email protected] h1:Mt/DSfnnSe3dyf6MH/dZZ0iww+viHNhAFc4rEYDiOAw=
github.com/BurntSushi/[email protected] h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs=
github.com/google/[email protected] h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
golang.org/x/exp/[email protected] h1:1P7xPZEwZMoBoz0Yze5Nx2/4pxj6nw9ZqHWXqP0iRgQ=
golang.org/x/[email protected] h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/[email protected] h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
golang.org/x/[email protected] h1:TCDqnvbBsFapViksHcHySl/sW4+rTGNIAoJJesHRuMM=
golang.org/x/[email protected] h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
golang.org/x/[email protected] h1:kgwdasJRsdDWYgWcEgMF424DiXwwXHSb3V8xVTi//i8=
golang.org/x/[email protected] h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I=
honnef.co/go/[email protected] h1:4bH5o3b5ZULQ4UrBmP+63W9r7qIkqJClEA9ko5YKx+I=
mvdan.cc/[email protected] h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU=
mvdan.cc/xurls/[email protected] h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=
go: go1.23.2
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Commit: fabdb6a30b49f79a7aba0f2ad9df9b399473380f
Date: 2024-12-19T10:22:47.216Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin x64 24.2.0
Go: Locate Configured Go Tools
command.Tools Configuration
Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
When I run or debug an embedded test on level 2 or more using
run test | debug test
button on top oft.Run
statement, the extension passes a wrong path to the go tool and it returns withtesting: warning: no tests to run
.Let's say I have 3 layer of tests as below. When I try to run
Inner test
, it executes the following command which ends up failing to find the correct test.Running tool: /usr/local/bin/go test -timeout 5m -run ^Test$/^Inner_test$ github.com/emreisikligil/test -v === RUN Test --- PASS: Test (0.00s) testing: warning: no tests to run PASS ok github.com/emreisikligil/test 0.466s [no tests to run]
The expected behavior is to run the corresponding test.
Steps to reproduce the behavior:
main_test.go:
go.mod:
run test
ordebug test
on top oft.Run("Inner test", func(t *testing.T) {
Screenshots or recordings
The text was updated successfully, but these errors were encountered: