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
I built a simple example app that has a single blackbox test. I ran the command go test ./..., which succeeded. I then ran the command go test -run 'TestFoo', which failed.
What did you expect to see?
$ go test -run 'TestFoo'
ok example/foo 0.006s
What did you see instead?
$ go test -run 'TestFoo'
can't load package: package example: unknown import path "example": cannot find module providing package example
System details
go version go1.11.1 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/andolson/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/andolson/go"
GOPROXY=""
GORACE=""
GOROOT="/Users/andolson/.asdf/installs/golang/1.11.1/go"
GOTMPDIR=""
GOTOOLDIR="/Users/andolson/.asdf/installs/golang/1.11.1/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/andolson/code/mod_test/go.mod"
GOROOT/bin/go version: go version go1.11.1 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.11.1
uname -v: Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64
ProductName: Mac OS X
ProductVersion: 10.13.6
BuildVersion: 17G65
lldb --version: lldb-1000.0.37
Swift-4.2
The text was updated successfully, but these errors were encountered:
drewolson
changed the title
go test -run '<pattern>' fails with modules
cmd/go: go test -run '<pattern>' fails with modules
Oct 24, 2018
It seems this may be an issue of not providing a path after the pattern. This is what my vim plugin (vim-test) generates for the testing command, but it appears to work if I run go test -run TestFoo ./....
What did you do?
I built a simple example app that has a single blackbox test. I ran the command
go test ./...
, which succeeded. I then ran the commandgo test -run 'TestFoo'
, which failed.What did you expect to see?
What did you see instead?
System details
The text was updated successfully, but these errors were encountered: