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: Add LogInfoWithHost test

This commit is contained in:
Henrik Hautakoski 2023-02-07 08:43:29 +01:00
parent 0448ea4781
commit 6b561bdf25
No known key found for this signature in database
GPG key ID: 217490840C18A5D9

View file

@ -32,6 +32,14 @@ func TestAtomicAsset_LogInfo(t *testing.T) {
assert.Equal(t, expected, api.LogInfo())
}
func TestAtomicAsset_LogInfoWithHost(t *testing.T) {
api := NewAtomicAsset("https://atomic.example.com", "some.other.host", 120)
expected := LogParams{"type", "atomicasset", "url", "https://atomic.example.com", "block_time", float64(120), "host", "some.other.host"}
assert.Equal(t, expected, api.LogInfo())
}
func TestAtomicAsset_SetTime(t *testing.T) {
expected := time.Date(2019, 3, 18, 20, 29, 32, 0, time.UTC)