mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-02-04 02:04:08 +02:00
fixed flaky test
This commit is contained in:
parent
4cf6069342
commit
f7ed55554f
@ -399,12 +399,16 @@ func TestRecordAuthResponseAuthAlertCheck(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
mockCreated := types.NowDateTime().Add(-time.Duration(len(s.devices)+1) * time.Second)
|
||||
// insert the mock devices
|
||||
for _, fingerprint := range s.devices {
|
||||
mockCreated = mockCreated.Add(1 * time.Second)
|
||||
d := core.NewAuthOrigin(app)
|
||||
d.SetCollectionRef(user.Collection().Id)
|
||||
d.SetRecordRef(user.Id)
|
||||
d.SetFingerprint(fingerprint)
|
||||
d.SetRaw("created", mockCreated)
|
||||
d.SetRaw("updated", mockCreated)
|
||||
if err = app.Save(d); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user