Skip to content

Commit

Permalink
main_test: skip test when invoked via go test
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed May 28, 2019
1 parent 8ff5914 commit 9ecbf5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ func TestMain(t *testing.T) {
// don't launch etcd server when invoked via go test
// Note: module name has /v3 now
if strings.HasSuffix(os.Args[0], "v3.test") {
return
t.Skip("skip launching etcd server when invoked via go test")
}
if len(os.Args) > 1 && strings.HasPrefix(os.Args[1], "-test.") {
t.Skip("skip launching etcd server when invoked via go test")
}

notifier := make(chan os.Signal, 1)
Expand Down

0 comments on commit 9ecbf5d

Please sign in to comment.