diff --git a/internal/topology/topology.go b/internal/topology/topology.go index a9c172ae5..280c7d647 100644 --- a/internal/topology/topology.go +++ b/internal/topology/topology.go @@ -95,7 +95,7 @@ type ResettableConfigTopologyRegistry struct { // NewResettableConfigTopologyRegistry creates a new ResettableConfigTopologyRegistry func NewResettableConfigTopologyRegistry() *ResettableConfigTopologyRegistry { return &ResettableConfigTopologyRegistry{ - topology: &sync.Map{}, + topology: &sync.Map{}, } } diff --git a/processor/topologyprocessor/processor_test.go b/processor/topologyprocessor/processor_test.go index 2065fcb98..07eb9592d 100644 --- a/processor/topologyprocessor/processor_test.go +++ b/processor/topologyprocessor/processor_test.go @@ -58,15 +58,15 @@ func TestProcessor_Logs(t *testing.T) { require.NoError(t, plogtest.CompareLogs(logs, processedLogs)) // validate that upsert route was performed - require.True(t, tmp.topology.DestGateway.AccountID == "myAccountID") - require.True(t, tmp.topology.DestGateway.OrgID == "myOrgID") - require.True(t, tmp.topology.DestGateway.ConfigName == "myConfigName") + require.True(t, tmp.topology.ConfigTopology.DestGateway.AccountID == "myAccountID") + require.True(t, tmp.topology.ConfigTopology.DestGateway.OrgID == "myOrgID") + require.True(t, tmp.topology.ConfigTopology.DestGateway.ConfigName == "myConfigName") ci := topology.GatewayInfo{ ConfigName: "myConfigName1", AccountID: "myAccountID1", OrgID: "myOrgID1", } - _, ok := tmp.topology.RouteTable[ci] + _, ok := tmp.topology.ConfigTopology.RouteTable[ci] require.True(t, ok) } @@ -98,15 +98,15 @@ func TestProcessor_Metrics(t *testing.T) { require.NoError(t, pmetrictest.CompareMetrics(metrics, processedMetrics)) // validate that upsert route was performed - require.True(t, tmp.topology.DestGateway.AccountID == "myAccountID") - require.True(t, tmp.topology.DestGateway.OrgID == "myOrgID") - require.True(t, tmp.topology.DestGateway.ConfigName == "myConfigName") + require.True(t, tmp.topology.ConfigTopology.DestGateway.AccountID == "myAccountID") + require.True(t, tmp.topology.ConfigTopology.DestGateway.OrgID == "myOrgID") + require.True(t, tmp.topology.ConfigTopology.DestGateway.ConfigName == "myConfigName") ci := topology.GatewayInfo{ ConfigName: "myConfigName1", AccountID: "myAccountID1", OrgID: "myOrgID1", } - _, ok := tmp.topology.RouteTable[ci] + _, ok := tmp.topology.ConfigTopology.RouteTable[ci] require.True(t, ok) } @@ -138,15 +138,15 @@ func TestProcessor_Traces(t *testing.T) { require.NoError(t, ptracetest.CompareTraces(traces, processedTraces)) // validate that upsert route was performed - require.True(t, tmp.topology.DestGateway.AccountID == "myAccountID") - require.True(t, tmp.topology.DestGateway.OrgID == "myOrgID") - require.True(t, tmp.topology.DestGateway.ConfigName == "myConfigName") + require.True(t, tmp.topology.ConfigTopology.DestGateway.AccountID == "myAccountID") + require.True(t, tmp.topology.ConfigTopology.DestGateway.OrgID == "myOrgID") + require.True(t, tmp.topology.ConfigTopology.DestGateway.ConfigName == "myConfigName") ci := topology.GatewayInfo{ ConfigName: "myConfigName1", AccountID: "myAccountID1", OrgID: "myOrgID1", } - _, ok := tmp.topology.RouteTable[ci] + _, ok := tmp.topology.ConfigTopology.RouteTable[ci] require.True(t, ok) }