ent->oss test fix (#10926)

This commit is contained in:
Chris S. Kim 2021-08-26 14:06:49 -04:00 committed by GitHub
parent 5c67517647
commit 86de20c975
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View File

@ -1939,13 +1939,15 @@ func TestInternal_ServiceTopology_RoutingConfig(t *testing.T) {
// but will be present in UpstreamSources as a k-v pair. // but will be present in UpstreamSources as a k-v pair.
require.Empty(r, out.ServiceTopology.Upstreams) require.Empty(r, out.ServiceTopology.Upstreams)
sn := structs.NewServiceName("routing-config", structs.DefaultEnterpriseMetaInDefaultPartition()).String()
expectUp := map[string]structs.IntentionDecisionSummary{ expectUp := map[string]structs.IntentionDecisionSummary{
"routing-config": {DefaultAllow: true, Allowed: true}, sn: {DefaultAllow: true, Allowed: true},
} }
require.Equal(r, expectUp, out.ServiceTopology.UpstreamDecisions) require.Equal(r, expectUp, out.ServiceTopology.UpstreamDecisions)
expectUpstreamSources := map[string]string{ expectUpstreamSources := map[string]string{
"routing-config": structs.TopologySourceRoutingConfig, sn: structs.TopologySourceRoutingConfig,
} }
require.Equal(r, expectUpstreamSources, out.ServiceTopology.UpstreamSources) require.Equal(r, expectUpstreamSources, out.ServiceTopology.UpstreamSources)

View File

@ -1916,11 +1916,12 @@ func TestUIServiceTopology_RoutingConfigs(t *testing.T) {
Downstreams: []*ServiceTopologySummary{ Downstreams: []*ServiceTopologySummary{
{ {
ServiceSummary: ServiceSummary{ ServiceSummary: ServiceSummary{
Name: "dashboard", Name: "dashboard",
Datacenter: "dc1", Datacenter: "dc1",
Nodes: []string{"foo"}, Nodes: []string{"foo"},
InstanceCount: 1, EnterpriseMeta: *structs.DefaultEnterpriseMetaInDefaultPartition(),
ChecksPassing: 1, InstanceCount: 1,
ChecksPassing: 1,
}, },
Source: "proxy-registration", Source: "proxy-registration",
Intention: structs.IntentionDecisionSummary{ Intention: structs.IntentionDecisionSummary{