Browse Source

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

Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
pull/4641/head
Maksim Nabokikh 4 days ago committed by GitHub
parent
commit
2bda64690d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      server/introspectionhandler_test.go

4
server/introspectionhandler_test.go

@ -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,
},
{

Loading…
Cancel
Save