Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
testutil: call flag.Parse in TestMain
Browse files Browse the repository at this point in the history
Because this test code is using ssntp, which uses glog, you
must call flag.Parse prior to using ssntp.

Signed-off-by: Kristen Carlson Accardi <[email protected]>
  • Loading branch information
kaccardi committed Jul 27, 2016
1 parent 0749a39 commit cdd5887
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testutil/client_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package testutil_test

import (
"flag"
"fmt"
"os"
"testing"
Expand Down Expand Up @@ -558,6 +559,10 @@ func TestPublicIPAssigned(t *testing.T) {
func TestMain(m *testing.M) {
var err error

// anything that uses ssntp must call flag.Parse first
// due to glog.
flag.Parse()

// start server
StartTestServer(&server)

Expand Down

0 comments on commit cdd5887

Please sign in to comment.