1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-16 04:44:55 +02:00

internal/api/atomicasset_test.go: Bugfix in calls to time.Date(), ment to pass 500 milliseconds, not microseconds.

This commit is contained in:
Henrik Hautakoski 2023-05-10 07:01:53 +02:00
parent 995f6a8629
commit 10f3a4d4be
No known key found for this signature in database
GPG key ID: 217490840C18A5D9

View file

@ -188,7 +188,7 @@ func TestAtomicAsset_InFutureUp(t *testing.T) {
}))
api := NewAtomicAsset(srv.URL, "", 120)
api.SetTime(time.Date(2024, 10, 15, 1, 9, 16, 500, time.UTC))
api.SetTime(time.Date(2024, 10, 15, 1, 9, 16, 500*int(time.Millisecond), time.UTC))
check, status := api.Call(context.Background())
@ -227,7 +227,7 @@ func TestAtomicAsset_InFutureDown(t *testing.T) {
}))
api := NewAtomicAsset(srv.URL, "", 120)
api.SetTime(time.Date(2002, 12, 29, 0, 45, 0o3, 500, time.UTC))
api.SetTime(time.Date(2002, 12, 29, 0, 45, 0o3, 500*int(time.Millisecond), time.UTC))
check, status := api.Call(context.Background())
@ -266,7 +266,7 @@ func TestAtomicAsset_RedisDown(t *testing.T) {
}))
api := NewAtomicAsset(srv.URL, "", 120)
api.SetTime(time.Date(2015, 3, 11, 11, 19, 30, 500, time.UTC))
api.SetTime(time.Date(2015, 3, 11, 11, 19, 30, 500*int(time.Millisecond), time.UTC))
check, status := api.Call(context.Background())
@ -305,7 +305,7 @@ func TestAtomicAsset_PostgresDown(t *testing.T) {
}))
api := NewAtomicAsset(srv.URL, "", 120)
api.SetTime(time.Date(2019, 7, 11, 18, 6, 11, 500, time.UTC))
api.SetTime(time.Date(2019, 7, 11, 18, 6, 11, 500*int(time.Millisecond), time.UTC))
check, status := api.Call(context.Background())