Restructured service account impersonation flow.

Change-Id: I17c0283f053711f44abaf5620f2642eea08aca62
This commit is contained in:
Patrick Jones
2021-01-25 00:02:46 -08:00
parent 85db953d34
commit 975d0951de
3 changed files with 38 additions and 29 deletions

View File

@@ -77,10 +77,7 @@ func TestImpersonation(t *testing.T) {
defer targetServer.Close()
testImpersonateConfig.TokenURL = targetServer.URL
ourTS := tokenSource{
ctx: context.Background(),
conf: &testImpersonateConfig,
}
ourTS := testImpersonateConfig.TokenSource(context.Background())
oldNow := now
defer func() { now = oldNow }()