From 7f45b746c1a60f8caea4333f3a0b88b346b476ca Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 17 Aug 2022 16:54:56 +0200 Subject: [PATCH] src/api/v1_test.go: Add test for LogInfo() --- src/api/v1_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/api/v1_test.go b/src/api/v1_test.go index fe35cdc..f0b2b88 100644 --- a/src/api/v1_test.go +++ b/src/api/v1_test.go @@ -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)