Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fixed the tests
Browse files Browse the repository at this point in the history
Signed-off-by: pmahindrakar-oss <[email protected]>
  • Loading branch information
pmahindrakar-oss committed Jan 12, 2023
1 parent d1a3323 commit 968544d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clients/go/admin/auth_interceptor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,6 @@ func TestMaterializeCredentials(t *testing.T) {
TokenURL: fmt.Sprintf("http://localhost:%d/api/v1/token", port),
Scopes: []string{"all"},
}, &mocks.TokenCache{}, f)
assert.EqualError(t, err, "failed to initialized token source provider. Err: failed to fetch client metadata. Error: rpc error: code = Unknown desc = expected err")
assert.EqualError(t, err, "failed to fetch client metadata. Error: rpc error: code = Unknown desc = expected err")
})
}
4 changes: 3 additions & 1 deletion clients/go/admin/token_source_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ func NewTokenSourceProvider(ctx context.Context, cfg *Config, tokenCache cache.T
scopes = publicClientConfig.Scopes
}
// Update audience from publicClientConfig
audienceValue = publicClientConfig.Audience
if cfg.UseAudienceFromAdmin {
audienceValue = publicClientConfig.Audience
}
}

tokenProvider, err = NewClientCredentialsTokenSourceProvider(ctx, cfg, scopes, tokenURL, audienceValue)
Expand Down

0 comments on commit 968544d

Please sign in to comment.