Open saberduck opened 5 years ago
go test will use module as package name in the json report. We should read content of the go.mod file. See https://github.com/golang/go/wiki/Modules
go test
go.mod
Sample go.mod
module github.com/getyoti/yoti-go-sdk/v2 require ( github.com/golang/protobuf v1.2.0 github.com/google/go-cmp v0.2.0 github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 // indirect golang.org/x/sync v0.0.0-20181108010431-42b317875d0f // indirect )
go test ./... -json
{"Time":"2019-05-28T15:19:12.3801013+02:00","Action":"run","Package":"github.com/getyoti/yoti-go-sdk/v2","Test":"TestYotiClient_KeyLoad_Failure"}
See also #361
go test
will use module as package name in the json report. We should read content of thego.mod
file. See https://github.com/golang/go/wiki/ModulesSample
go.mod
go test ./... -json