Browse Source

ent->oss test fix (#10926)

pull/10938/head
Chris S. Kim 3 years ago committed by GitHub
parent
commit
1a9b2f09dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      agent/consul/internal_endpoint_test.go
  2. 11
      agent/ui_endpoint_test.go

6
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)

11
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{

Loading…
Cancel
Save