File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ func TestMain(m *testing.M) {
103
103
}
104
104
105
105
client , err = NewClient (& internal.AuthConfig {
106
+ Ctx : context .Background (),
106
107
Creds : creds ,
107
108
ProjectID : "mock-project-id" ,
108
109
})
@@ -164,7 +165,7 @@ func TestCustomTokenError(t *testing.T) {
164
165
}
165
166
166
167
func TestCustomTokenInvalidCredential (t * testing.T ) {
167
- s , err := NewClient (& internal.AuthConfig {})
168
+ s , err := NewClient (& internal.AuthConfig {Ctx : context . Background () })
168
169
if err != nil {
169
170
t .Fatal (err )
170
171
}
@@ -227,7 +228,7 @@ func TestVerifyIDTokenError(t *testing.T) {
227
228
}
228
229
229
230
func TestNoProjectID (t * testing.T ) {
230
- c , err := NewClient (& internal.AuthConfig {Creds : creds })
231
+ c , err := NewClient (& internal.AuthConfig {Ctx : context . Background (), Creds : creds })
231
232
if err != nil {
232
233
t .Fatal (err )
233
234
}
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import (
20
20
"flag"
21
21
"fmt"
22
22
"io/ioutil"
23
+ "log"
23
24
"net/http"
24
25
"os"
25
26
"testing"
@@ -37,18 +38,18 @@ var client *auth.Client
37
38
func TestMain (m * testing.M ) {
38
39
flag .Parse ()
39
40
if testing .Short () {
40
- fmt .Println ("skipping auth integration tests in short mode." )
41
+ log .Println ("skipping auth integration tests in short mode." )
41
42
os .Exit (0 )
42
43
}
43
44
44
45
app , err := internal .NewTestApp (context .Background ())
45
46
if err != nil {
46
- os . Exit ( 1 )
47
+ log . Fatalln ( err )
47
48
}
48
49
49
50
client , err = app .Auth ()
50
51
if err != nil {
51
- os . Exit ( 1 )
52
+ log . Fatalln ( err )
52
53
}
53
54
54
55
os .Exit (m .Run ())
You can’t perform that action at this time.
0 commit comments