test: fix token introspection tests to use consistent timestamps (#4639)

Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
This commit is contained in:
Maksim Nabokikh
2026-03-13 13:09:30 +01:00
committed by GitHub
parent 13f012fb81
commit 2bda64690d
+2 -2
View File
@@ -298,7 +298,7 @@ func TestHandleIntrospect(t *testing.T) {
{
testName: "Access Token: active",
token: activeAccessToken,
response: toJSON(getIntrospectionValue(s.issuerURL, time.Now(), expiry, "access_token")),
response: toJSON(getIntrospectionValue(s.issuerURL, t0, expiry, "access_token")),
responseStatusCode: 200,
},
{
@@ -311,7 +311,7 @@ func TestHandleIntrospect(t *testing.T) {
{
testName: "Refresh Token: active",
token: activeRefreshToken,
response: toJSON(getIntrospectionValue(s.issuerURL, time.Now(), time.Now().Add(s.refreshTokenPolicy.absoluteLifetime), "refresh_token")),
response: toJSON(getIntrospectionValue(s.issuerURL, t0, t0.Add(s.refreshTokenPolicy.absoluteLifetime), "refresh_token")),
responseStatusCode: 200,
},
{