From 86de20c97566e6b8a9efdfa6ac7f0224cfee45c6 Mon Sep 17 00:00:00 2001 From: "Chris S. Kim" Date: Thu, 26 Aug 2021 14:06:49 -0400 Subject: [PATCH] ent->oss test fix (#10926) --- agent/consul/internal_endpoint_test.go | 6 ++++-- agent/ui_endpoint_test.go | 11 ++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/agent/consul/internal_endpoint_test.go b/agent/consul/internal_endpoint_test.go index 14b39794d..ee592d4d7 100644 --- a/agent/consul/internal_endpoint_test.go +++ b/agent/consul/internal_endpoint_test.go @@ -1939,13 +1939,15 @@ func TestInternal_ServiceTopology_RoutingConfig(t *testing.T) { // but will be present in UpstreamSources as a k-v pair. require.Empty(r, out.ServiceTopology.Upstreams) + sn := structs.NewServiceName("routing-config", structs.DefaultEnterpriseMetaInDefaultPartition()).String() + expectUp := map[string]structs.IntentionDecisionSummary{ - "routing-config": {DefaultAllow: true, Allowed: true}, + sn: {DefaultAllow: true, Allowed: true}, } require.Equal(r, expectUp, out.ServiceTopology.UpstreamDecisions) expectUpstreamSources := map[string]string{ - "routing-config": structs.TopologySourceRoutingConfig, + sn: structs.TopologySourceRoutingConfig, } require.Equal(r, expectUpstreamSources, out.ServiceTopology.UpstreamSources) diff --git a/agent/ui_endpoint_test.go b/agent/ui_endpoint_test.go index 1734e0340..84cd971a7 100644 --- a/agent/ui_endpoint_test.go +++ b/agent/ui_endpoint_test.go @@ -1916,11 +1916,12 @@ func TestUIServiceTopology_RoutingConfigs(t *testing.T) { Downstreams: []*ServiceTopologySummary{ { ServiceSummary: ServiceSummary{ - Name: "dashboard", - Datacenter: "dc1", - Nodes: []string{"foo"}, - InstanceCount: 1, - ChecksPassing: 1, + Name: "dashboard", + Datacenter: "dc1", + Nodes: []string{"foo"}, + EnterpriseMeta: *structs.DefaultEnterpriseMetaInDefaultPartition(), + InstanceCount: 1, + ChecksPassing: 1, }, Source: "proxy-registration", Intention: structs.IntentionDecisionSummary{