Skip to content

Commit 2368321

Browse files
committed
fix make test early failure
1 parent 3ace8c2 commit 2368321

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/e2e/metriconly/e2e_npd_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ func TestNPD(t *testing.T) {
5959
t.Skip("skipping test in short mode.")
6060
}
6161

62+
var err error
63+
computeService, err = gce.GetComputeClient()
64+
if err != nil {
65+
panic(fmt.Sprintf("Unable to create gcloud compute service using defaults. Make sure you are authenticated. %v", err))
66+
}
67+
6268
if *project == "" {
6369
boskosClient := client.NewClient(*jobName, *boskosServerURL)
6470
*project = acquireProjectOrDie(boskosClient)
@@ -112,11 +118,5 @@ func releaseProjectOrDie(boskosClient *client.Client) {
112118
func TestMain(m *testing.M) {
113119
flag.Parse()
114120

115-
var err error
116-
computeService, err = gce.GetComputeClient()
117-
if err != nil {
118-
panic(fmt.Sprintf("Unable to create gcloud compute service using defaults. Make sure you are authenticated. %v", err))
119-
}
120-
121121
os.Exit(m.Run())
122122
}

0 commit comments

Comments
 (0)