mirror of
https://github.com/status-im/consul.git
synced 2025-02-16 15:47:21 +00:00
Fix HTTPRoute and TCPRoute expectation for enterprise metadata (#16322)
This commit is contained in:
parent
15d2684ecc
commit
4607b535be
@ -3,6 +3,7 @@ package structs
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/hashicorp/consul/acl"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -36,8 +37,9 @@ func TestTCPRoute(t *testing.T) {
|
|||||||
normalizeOnly: true,
|
normalizeOnly: true,
|
||||||
check: func(t *testing.T, entry ConfigEntry) {
|
check: func(t *testing.T, entry ConfigEntry) {
|
||||||
expectedParent := ResourceReference{
|
expectedParent := ResourceReference{
|
||||||
Kind: APIGateway,
|
Kind: APIGateway,
|
||||||
Name: "gateway",
|
Name: "gateway",
|
||||||
|
EnterpriseMeta: *acl.DefaultEnterpriseMeta(),
|
||||||
}
|
}
|
||||||
route := entry.(*TCPRouteConfigEntry)
|
route := entry.(*TCPRouteConfigEntry)
|
||||||
require.Len(t, route.Parents, 1)
|
require.Len(t, route.Parents, 1)
|
||||||
@ -74,8 +76,9 @@ func TestHTTPRoute(t *testing.T) {
|
|||||||
normalizeOnly: true,
|
normalizeOnly: true,
|
||||||
check: func(t *testing.T, entry ConfigEntry) {
|
check: func(t *testing.T, entry ConfigEntry) {
|
||||||
expectedParent := ResourceReference{
|
expectedParent := ResourceReference{
|
||||||
Kind: APIGateway,
|
Kind: APIGateway,
|
||||||
Name: "gateway",
|
Name: "gateway",
|
||||||
|
EnterpriseMeta: *acl.DefaultEnterpriseMeta(),
|
||||||
}
|
}
|
||||||
route := entry.(*HTTPRouteConfigEntry)
|
route := entry.(*HTTPRouteConfigEntry)
|
||||||
require.Len(t, route.Parents, 1)
|
require.Len(t, route.Parents, 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user