mirror of
https://github.com/zitadel/zitadel.git
synced 2026-08-19 01:14:48 -05:00
test: added checks for timestamps in passkey test (#12003)
# Which Problems Are Solved A test was failing because of timezone flakiness # How the Problems Are Solved The actual problem was an `updatedAt` field was not filled in because of the `createdAt` was missing on an event. This caused a zero value to be filled in into the `updatedAt` field. Postgres then stored this value with seconds in it's timezone info, which go could not store. By adding filling in the `createdAt` field, this does not occur.
This commit is contained in:
@@ -218,6 +218,7 @@ func TestUserRelationalProjection_Reducers(t *testing.T) {
|
||||
33,
|
||||
"",
|
||||
)
|
||||
pkeyVerifiedEvt.Creation = time.Now()
|
||||
|
||||
// Test
|
||||
eventReduced := callReduce(t, rawTx, handler, pkeyVerifiedEvt)
|
||||
@@ -239,6 +240,8 @@ func TestUserRelationalProjection_Reducers(t *testing.T) {
|
||||
assert.Equal(t, pkeyVerifiedEvt.AAGUID, gotPKey.AuthenticatorAttestationGUID)
|
||||
assert.Equal(t, pkeyVerifiedEvt.SignCount, gotPKey.SignCount)
|
||||
assert.Equal(t, pkeyVerifiedEvt.WebAuthNTokenName, gotPKey.Name)
|
||||
assert.Equal(t, pkeyVerifiedEvt.Creation.Round(time.Millisecond), gotPKey.UpdatedAt.Round(time.Millisecond))
|
||||
assert.Equal(t, pkey.CreatedAt.Round(time.Millisecond), gotPKey.CreatedAt.Round(time.Millisecond))
|
||||
assert.NotZero(t, gotPKey.VerifiedAt)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user