proto: fix RoundTrip test for enterprise (#8826)

pull/8833/head
Daniel Nephin 4 years ago committed by GitHub
parent 356998d91e
commit 3fe95f17d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,12 +10,13 @@ import (
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts" "github.com/google/go-cmp/cmp/cmpopts"
fuzz "github.com/google/gofuzz" fuzz "github.com/google/gofuzz"
"github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/agent/structs"
) )
func TestNewCheckServiceNodeFromStructs_RoundTrip(t *testing.T) { func TestNewCheckServiceNodeFromStructs_RoundTrip(t *testing.T) {
repeat(t, func(t *testing.T, fuzzer *fuzz.Fuzzer) { 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 var target structs.CheckServiceNode
fuzzer.Fuzz(&target) 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) {
}

Loading…
Cancel
Save