mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-06-18 05:00:03 +02:00
src/api/v1_test.go: Add test for LogInfo()
This commit is contained in:
parent
bfb74e8e48
commit
7f45b746c1
1 changed files with 9 additions and 0 deletions
|
|
@ -10,6 +10,15 @@ import (
|
|||
"github.com/eosswedenorg-go/haproxy/agentcheck"
|
||||
)
|
||||
|
||||
func TestV1LogInfo(t *testing.T) {
|
||||
|
||||
api := NewEosioV1("https://api.v1.example.com", "host.example.com", 120)
|
||||
|
||||
expected := LogParams{"type","eosio-v1","url","https://api.v1.example.com","host","host.example.com","block_time",float64(120)}
|
||||
|
||||
assert.Equal(t, expected, api.LogInfo())
|
||||
}
|
||||
|
||||
func TestV1SetTime(t *testing.T) {
|
||||
|
||||
expected := time.Date(2022, 2, 24, 13, 38, 0, 0, time.UTC)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue