From 5be68f7764e3f6d00a9ae59cf8459d718bd6ddcb Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:13:35 +0100 Subject: [PATCH] chore: synchronize workspaces --- oauth2/fosite_store_helpers.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/oauth2/fosite_store_helpers.go b/oauth2/fosite_store_helpers.go index 618227d4f47..55507f09d5e 100644 --- a/oauth2/fosite_store_helpers.go +++ b/oauth2/fosite_store_helpers.go @@ -1002,11 +1002,11 @@ func testFositeJWTBearerGrantStorage(x InternalRegistry) func(t *testing.T) { }) t.Run("case=does not return expired values", func(t *testing.T) { - keySet, err := jwk.GenerateJWK(context.Background(), jose.RS256, "issuer-key", "sig") + keySet, err := jwk.GenerateJWK(context.Background(), jose.RS256, "issuer-expired-key", "sig") require.NoError(t, err) publicKey := keySet.Keys[0].Public() - issuer := "unlimited-issuer" + issuer := "expired-issuer" grant := trust.Grant{ ID: uuid.New(), Issuer: issuer, @@ -1021,8 +1021,9 @@ func testFositeJWTBearerGrantStorage(x InternalRegistry) func(t *testing.T) { err = grantManager.CreateGrant(context.TODO(), grant, publicKey) require.NoError(t, err) - _, err = grantStorage.GetPublicKeys(context.TODO(), issuer, "any-subject-3") - require.ErrorIs(t, err, sqlcon.ErrNoRows) + keys, err := grantStorage.GetPublicKeys(context.TODO(), issuer, "any-subject-3") + require.NoError(t, err) + assert.Len(t, keys.Keys, 0) }) } }