2017-12-19 13:16:39 +01:00

23 lines
442 B
Go

package main
import (
"flag"
"testing"
)
var systemTest *bool
func init() {
systemTest = flag.Bool("systemTest", false, "Set to true when running system tests")
RootCmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("systemTest"))
RootCmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("test.coverprofile"))
}
// Test started when the test binary is started
func TestSystem(t *testing.T) {
if *systemTest {
main()
}
}