made some changes

This commit is contained in:
Patrick Jones
2021-08-09 14:38:40 -07:00
parent 57c99ca18a
commit 109292283c
5 changed files with 56 additions and 48 deletions

View File

@@ -10,6 +10,7 @@ import (
"io/ioutil"
"net/http"
"net/http/httptest"
"regexp"
"testing"
)
@@ -77,7 +78,9 @@ func TestImpersonation(t *testing.T) {
defer targetServer.Close()
testImpersonateConfig.TokenURL = targetServer.URL
ourTS, err := testImpersonateConfig.tokenSource(context.Background(), true)
allURLs := regexp.MustCompile(".*")
fmt.Println(allURLs)
ourTS, err := testImpersonateConfig.tokenSource(context.Background(), []*regexp.Regexp{allURLs}, []*regexp.Regexp{allURLs})
if err != nil {
fmt.Println(testImpersonateConfig.TokenURL)
t.Fatalf("Failed to create TokenSource: %v", err)