1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-19 05:10:02 +02:00

Refactor: move internal package from src/ to internal/ and move src/main.go to cmd/eosio-api-healthcheck/main.go

This commit is contained in:
Henrik Hautakoski 2022-10-27 12:55:44 +02:00
parent c27abb5ed9
commit 6448aeb0f7
No known key found for this signature in database
GPG key ID: 608414D93E862CCD
22 changed files with 19 additions and 17 deletions

View file

@ -1,50 +0,0 @@
package api
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestLogParams(t *testing.T) {
type test_struct struct {
First string
Second int
}
p := LogParams{}
p.Add("one", 1)
p.Add("string", "str")
p.Add("struct", test_struct{First:"first_string",Second:1234})
expected := []interface{}([]interface {}{
"one",1,
"string","str",
"struct",test_struct{
First:"first_string",
Second:1234,
},
})
assert.ElementsMatch(t, expected, p)
}
func TestLogParamsCombine(t *testing.T) {
a := LogParams{"one",1,"string1","str1"}
b := LogParams{"two",2,"string2","str2"}
expected := LogParams{
"one",1,
"string1","str1",
"two",2,
"string2","str2",
}
assert.Equal(t, expected, a.Combine(b))
}