|
|
|
@ -10,12 +10,13 @@ import (
|
|
|
|
|
"github.com/google/go-cmp/cmp" |
|
|
|
|
"github.com/google/go-cmp/cmp/cmpopts" |
|
|
|
|
fuzz "github.com/google/gofuzz" |
|
|
|
|
|
|
|
|
|
"github.com/hashicorp/consul/agent/structs" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
func TestNewCheckServiceNodeFromStructs_RoundTrip(t *testing.T) { |
|
|
|
|
repeat(t, func(t *testing.T, fuzzer *fuzz.Fuzzer) { |
|
|
|
|
fuzzer.Funcs(randInt32, randUint32, randInterface, randStructsUpstream) |
|
|
|
|
fuzzer.Funcs(randInt32, randUint32, randInterface, randStructsUpstream, randEnterpriseMeta) |
|
|
|
|
var target structs.CheckServiceNode |
|
|
|
|
fuzzer.Fuzz(&target) |
|
|
|
|
|
|
|
|
@ -107,3 +108,8 @@ func randInterface(m *interface{}, c fuzz.Continue) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TODO(streaming): this is a quick fix to get the tests passing in enterprise.
|
|
|
|
|
// This needs to use a real random value once enterprise support is complete.
|
|
|
|
|
func randEnterpriseMeta(_ *structs.EnterpriseMeta, _ fuzz.Continue) { |
|
|
|
|
} |
|
|
|
|