diff --git a/app/api_topology_test.go b/app/api_topology_test.go index f8f0729d1..7a060d462 100644 --- a/app/api_topology_test.go +++ b/app/api_topology_test.go @@ -32,8 +32,7 @@ func TestAPITopologyApplications(t *testing.T) { report.MakeEndpointNodeID("hostA", "192.168.1.1", "12345"), report.MakeEndpointNodeID("hostA", "192.168.1.1", "12346"), report.MakeHostNodeID("hostA"), - ), node.Origins, - ) + ), node.Origins) equals(t, "curl", node.LabelMajor) equals(t, "node-a.local (23128)", node.LabelMinor) equals(t, "23128", node.Rank) diff --git a/app/mock_reporter_test.go b/app/mock_reporter_test.go index c097b74f6..5529b52da 100644 --- a/app/mock_reporter_test.go +++ b/app/mock_reporter_test.go @@ -55,24 +55,28 @@ func (s StaticReport) Report() report.Report { }, NodeMetadatas: report.NodeMetadatas{ report.MakeEndpointNodeID("hostA", "192.168.1.1", "12345"): report.NodeMetadata{ - "pid": "23128", - "name": "curl", - "domain": "node-a.local", + "pid": "23128", + "name": "curl", + "domain": "node-a.local", + report.HostNodeID: report.MakeHostNodeID("hostA"), }, report.MakeEndpointNodeID("hostA", "192.168.1.1", "12346"): report.NodeMetadata{ // <-- same as :12345 - "pid": "23128", - "name": "curl", - "domain": "node-a.local", + "pid": "23128", + "name": "curl", + "domain": "node-a.local", + report.HostNodeID: report.MakeHostNodeID("hostA"), }, report.MakeEndpointNodeID("hostA", "192.168.1.1", "8888"): report.NodeMetadata{ - "pid": "55100", - "name": "ssh", - "domain": "node-a.local", + "pid": "55100", + "name": "ssh", + "domain": "node-a.local", + report.HostNodeID: report.MakeHostNodeID("hostA"), }, report.MakeEndpointNodeID("hostB", "192.168.1.2", "80"): report.NodeMetadata{ - "pid": "215", - "name": "apache", - "domain": "node-b.local", + "pid": "215", + "name": "apache", + "domain": "node-b.local", + report.HostNodeID: report.MakeHostNodeID("hostB"), }, }, }, @@ -107,10 +111,12 @@ func (s StaticReport) Report() report.Report { }, NodeMetadatas: report.NodeMetadatas{ report.MakeAddressNodeID("hostA", "192.168.1.1"): report.NodeMetadata{ - "name": "host-a", + "name": "host-a", + report.HostNodeID: report.MakeHostNodeID("hostA"), }, report.MakeAddressNodeID("hostB", "192.168.1.2"): report.NodeMetadata{ - "name": "host-b", + "name": "host-b", + report.HostNodeID: report.MakeHostNodeID("hostB"), }, }, },