github.com/haalcala/mattermost-server-change-repo@v0.0.0-20210713015153-16753fbeee5f/cmd/mattermost/main_test.go (about) 1 // +build maincoverage 2 3 package main 4 5 import ( 6 "testing" 7 ) 8 9 // TestRunMain can be used to track code coverage in integration tests. 10 // To run this: 11 // go test -coverpkg="<>" -mod=vendor -ldflags '<>' -tags maincoverage -c ./cmd/mattermost/ 12 // ./mattermost.test -test.run="^TestRunMain$" -test.coverprofile=coverage.out 13 // And then run your integration tests. 14 func TestRunMain(t *testing.T) { 15 main() 16 }