Skip to content

Commit

Permalink
fix(internal): move service-account.json to testdata (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyoss committed Oct 5, 2020
1 parent 5f8ad47 commit 8bdc877
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/creds_test.go
Expand Up @@ -37,7 +37,7 @@ func TestTokenSource(t *testing.T) {
// TODO(jba): make this an error?
ds = &DialSettings{
TokenSource: ts,
CredentialsFile: "service-account.json",
CredentialsFile: "testdata/service-account.json",
}
got, err = Creds(ctx, ds)
if err != nil {
Expand All @@ -54,7 +54,7 @@ func TestDefaultServiceAccount(t *testing.T) {

// Load a valid JSON file. No way to really test the contents; we just
// verify that there is no error.
ds := &DialSettings{CredentialsFile: "service-account.json"}
ds := &DialSettings{CredentialsFile: "testdata/service-account.json"}
if _, err := Creds(ctx, ds); err != nil {
t.Errorf("got %v, wanted no error", err)
}
Expand All @@ -72,7 +72,7 @@ func TestJWTWithAudience(t *testing.T) {

// Load a valid JSON file. No way to really test the contents; we just
// verify that there is no error.
ds := &DialSettings{CredentialsFile: "service-account.json", Audiences: []string{"foo"}}
ds := &DialSettings{CredentialsFile: "testdata/service-account.json", Audiences: []string{"foo"}}
if _, err := Creds(ctx, ds); err != nil {
t.Errorf("got %v, wanted no error", err)
}
Expand All @@ -90,7 +90,7 @@ func TestOAuth(t *testing.T) {

// Load a valid JSON file. No way to really test the contents; we just
// verify that there is no error.
ds := &DialSettings{CredentialsFile: "service-account.json", Scopes: []string{"foo"}}
ds := &DialSettings{CredentialsFile: "testdata/service-account.json", Scopes: []string{"foo"}}
if _, err := Creds(ctx, ds); err != nil {
t.Errorf("got %v, wanted no error", err)
}
Expand Down
File renamed without changes.

0 comments on commit 8bdc877

Please sign in to comment.