You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/proto-public/pbmesh/v2beta1/pbproxystate/protocol_test.go

23 lines
817 B

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package pbproxystate
import (
"testing"
pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v2beta1"
"github.com/stretchr/testify/require"
)
// TestMirrorsCatalogProtocol ensures that there is no unintended drift between pbcatalog.Protocol and
// pbproxystate.Protocol.
func TestMirrorsCatalogProtocol(t *testing.T) {
require.Equal(t, pbcatalog.Protocol_value, Protocol_value, "pbcatalog.Protocol and pbproxystate.Protocol have diverged")
for i := range pbcatalog.Protocol_name {
require.Equal(t, pbcatalog.Protocol_name[i], Protocol_name[i],
"pbcatalog.Protocol and pbproxystate.Protocol ordinals do not match;"+
" ordinals for equivalent values must match so that casting between them produces expected results")
}
}