mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
tests: replace godebug by go-cmp for structure diffs
go-cmp is stricter and allow to catch more problems. Moreover, the output is a bit nicer.
This commit is contained in:
@@ -9,6 +9,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/benbjohnson/clock"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
|
||||
"akvorado/common/clickhousedb"
|
||||
"akvorado/common/clickhousedb/mocks"
|
||||
@@ -43,3 +45,8 @@ func NewMock(t *testing.T, config Configuration) (*Component, *httpserver.Compon
|
||||
helpers.StartStop(t, c)
|
||||
return c, h, mockConn, mockClock
|
||||
}
|
||||
|
||||
func init() {
|
||||
helpers.RegisterCmpOption(cmpopts.IgnoreUnexported(graphCommonHandlerInput{}))
|
||||
helpers.RegisterCmpOption(cmp.AllowUnexported(graphLineHandlerInput{}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user