mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-08-01 04:46:12 +00:00
jwtcachefiller_test.go: don't assert about time zones in errors
Because the library that we are using which returns that error formats the timestamp in localtime, which is LMT when running on a laptop, but is UTC when running in CI. Signed-off-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
committed by
Ryan Richard
parent
dcb19150fc
commit
1d4012cabf
@@ -583,14 +583,14 @@ func testTableForAuthenticateTokenTests(
|
||||
jwtClaims: func(claims *jwt.Claims, _ *interface{}, username *string) {
|
||||
claims.Expiry = jwt.NewNumericDate(time.Date(1, 2, 3, 4, 5, 6, 7, time.UTC))
|
||||
},
|
||||
wantErrorRegexp: `oidc: verify token: oidc: token is expired \(Token Expiry: 0001-02-02 20:12:08 -0752 LMT\)`,
|
||||
wantErrorRegexp: `oidc: verify token: oidc: token is expired \(Token Expiry: .+`,
|
||||
},
|
||||
{
|
||||
name: "bad token without exp",
|
||||
jwtClaims: func(claims *jwt.Claims, _ *interface{}, username *string) {
|
||||
claims.Expiry = nil
|
||||
},
|
||||
wantErrorRegexp: `oidc: verify token: oidc: token is expired \(Token Expiry: 0001-01-01 00:00:00 \+0000 UTC\)`,
|
||||
wantErrorRegexp: `oidc: verify token: oidc: token is expired \(Token Expiry: .+`,
|
||||
},
|
||||
{
|
||||
name: "token does not have username claim",
|
||||
|
||||
Reference in New Issue
Block a user