Skip to content

Commit

Permalink
Fix HTTPRoute and TCPRoute expectation for enterprise metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Stucki committed Feb 17, 2023
1 parent 15d2684 commit d3daf89
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions agent/structs/config_entry_routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package structs
import (
"testing"

"github.com/hashicorp/consul/acl"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -36,8 +37,9 @@ func TestTCPRoute(t *testing.T) {
normalizeOnly: true,
check: func(t *testing.T, entry ConfigEntry) {
expectedParent := ResourceReference{
Kind: APIGateway,
Name: "gateway",
Kind: APIGateway,
Name: "gateway",
EnterpriseMeta: *acl.DefaultEnterpriseMeta(),
}
route := entry.(*TCPRouteConfigEntry)
require.Len(t, route.Parents, 1)
Expand Down Expand Up @@ -74,8 +76,9 @@ func TestHTTPRoute(t *testing.T) {
normalizeOnly: true,
check: func(t *testing.T, entry ConfigEntry) {
expectedParent := ResourceReference{
Kind: APIGateway,
Name: "gateway",
Kind: APIGateway,
Name: "gateway",
EnterpriseMeta: *acl.DefaultEnterpriseMeta(),
}
route := entry.(*HTTPRouteConfigEntry)
require.Len(t, route.Parents, 1)
Expand Down

0 comments on commit d3daf89

Please sign in to comment.