I used to use go test ./...
in CI. This will test all xxx_test.go
files. But now I want this testcase to ignore some test files in a folder which is ended with -TestClient
. What to do?
For example:
XFolderTestClient
| -- xxx_test.go x
| -- xxx2_test.go x
AnotherFolder
| -- yyy.go √
...
I only want to ignore test files in folders ending with TestClient.
3Q~
You can use the run
flag to pass a regex/pattern ala:
go test -run YourRegex