Skip to content

Commit 13b8011

Browse files
committed
fix: update tests
1 parent c18b10a commit 13b8011

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

internal/api/provider/custom_oauth_claims_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ func TestCustomOIDCProvider_GetUserData_UserinfoAllowlist(t *testing.T) {
191191
provider, err := NewCustomOIDCProvider(
192192
context.Background(),
193193
"client-id", "client-secret", "https://myapp.com/callback",
194-
[]string{"openid"}, server.URL, false,
194+
[]string{"openid"}, server.URL, server.URL + "/.well-known/openid-configuration", false,
195195
nil, nil, nil,
196196
[]string{"mail", "sn"},
197-
NewOIDCProviderCache(0),
197+
newTestOIDCProviderCache(t, 0),
198198
)
199199
require.NoError(t, err)
200200

@@ -257,10 +257,10 @@ func TestCustomOIDCProvider_GetUserData_IDTokenAllowlist(t *testing.T) {
257257
provider, err := NewCustomOIDCProvider(
258258
context.Background(),
259259
"client-id", "client-secret", "https://myapp.com/callback",
260-
[]string{"openid"}, server.URL, false,
260+
[]string{"openid"}, server.URL, server.URL + "/.well-known/openid-configuration", false,
261261
nil, nil, nil,
262262
[]string{"groups", "org_id"},
263-
NewOIDCProviderCache(0),
263+
newTestOIDCProviderCache(t, 0),
264264
)
265265
require.NoError(t, err)
266266

internal/api/provider/custom_oauth_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ func TestNewCustomOIDCProvider_CustomDiscoveryURL(t *testing.T) {
472472
server.URL+"/custom-discovery",
473473
false,
474474
nil, nil, nil,
475+
nil,
475476
newTestOIDCProviderCache(t, time.Hour),
476477
)
477478
require.NoError(t, err)

0 commit comments

Comments
 (0)