From 3d115362ff50644e41ca164fbb51f644c0024753 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Wed, 6 Nov 2024 17:19:53 -0500 Subject: [PATCH] update oidc_test.go Signed-off-by: Atif Ali --- util/oidc/oidc_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/util/oidc/oidc_test.go b/util/oidc/oidc_test.go index 8332acaf98885..020c3ae9fb2db 100644 --- a/util/oidc/oidc_test.go +++ b/util/oidc/oidc_test.go @@ -639,7 +639,7 @@ func TestGetUserInfo(t *testing.T) { expectError bool }{ { - key: formatUserInfoResponseCacheKey("randomUser"), + key: formatUserInfoResponseCacheKey(jwt.MapClaims{"sub": "randomUser"}), expectError: true, }, }, @@ -654,7 +654,7 @@ func TestGetUserInfo(t *testing.T) { encrypt bool }{ { - key: formatAccessTokenCacheKey("randomUser"), + key: formatUserInfoResponseCacheKey(jwt.MapClaims{"sub": "randomUser"}), value: "FakeAccessToken", encrypt: true, }, @@ -673,7 +673,7 @@ func TestGetUserInfo(t *testing.T) { expectError bool }{ { - key: formatUserInfoResponseCacheKey("randomUser"), + key: formatUserInfoResponseCacheKey(jwt.MapClaims{"sub": "randomUser"}), expectError: true, }, }, @@ -688,7 +688,7 @@ func TestGetUserInfo(t *testing.T) { encrypt bool }{ { - key: formatAccessTokenCacheKey("randomUser"), + key: formatUserInfoResponseCacheKey(jwt.MapClaims{"sub": "randomUser"}), value: "FakeAccessToken", encrypt: true, }, @@ -707,7 +707,7 @@ func TestGetUserInfo(t *testing.T) { expectError bool }{ { - key: formatUserInfoResponseCacheKey("randomUser"), + key: formatUserInfoResponseCacheKey(jwt.MapClaims{"sub": "randomUser"}), expectError: true, }, }, @@ -730,7 +730,7 @@ func TestGetUserInfo(t *testing.T) { encrypt bool }{ { - key: formatAccessTokenCacheKey("randomUser"), + key: formatUserInfoResponseCacheKey(jwt.MapClaims{"sub": "randomUser"}), value: "FakeAccessToken", encrypt: true, }, @@ -749,7 +749,7 @@ func TestGetUserInfo(t *testing.T) { expectError bool }{ { - key: formatUserInfoResponseCacheKey("randomUser"), + key: formatUserInfoResponseCacheKey(jwt.MapClaims{"sub": "randomUser"}), expectError: true, }, }, @@ -782,7 +782,7 @@ func TestGetUserInfo(t *testing.T) { expectError bool }{ { - key: formatUserInfoResponseCacheKey("randomUser"), + key: formatUserInfoResponseCacheKey(jwt.MapClaims{"sub": "randomUser"}), value: "{\"groups\":[\"githubOrg:engineers\"]}", expectEncrypted: true, expectError: false, @@ -809,7 +809,7 @@ func TestGetUserInfo(t *testing.T) { encrypt bool }{ { - key: formatAccessTokenCacheKey("randomUser"), + key: formatUserInfoResponseCacheKey(jwt.MapClaims{"sub": "randomUser"}), value: "FakeAccessToken", encrypt: true, },