Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
colelaven committed Dec 12, 2024
1 parent 5da9bb3 commit 5b772c2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion internal/topology/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ type ResettableConfigTopologyRegistry struct {
// NewResettableConfigTopologyRegistry creates a new ResettableConfigTopologyRegistry
func NewResettableConfigTopologyRegistry() *ResettableConfigTopologyRegistry {
return &ResettableConfigTopologyRegistry{
topology: &sync.Map{},
topology: &sync.Map{},
}
}

Expand Down
24 changes: 12 additions & 12 deletions processor/topologyprocessor/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -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)
}

Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 5b772c2

Please sign in to comment.