Skip to content

Commit

Permalink
Lints
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Wakely <[email protected]>
  • Loading branch information
StephenWakely committed Nov 28, 2024
1 parent 93c0fff commit 79246d9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ func Module() fxutil.Module {

type dependencies struct {
fx.In
Log log.Component
Config config.Component
Hostname hostname.Component
Compressor compression.Component
Tagger tagger.Component
HaAgent haagent.Component
Log log.Component
Config config.Component
Hostname hostname.Component
CompressionFactory compression.Factory
Compressor compression.Component
Tagger tagger.Component
HaAgent haagent.Component
}

type diagnoseSenderManager struct {
Expand Down
2 changes: 1 addition & 1 deletion comp/otelcol/otlp/integrationtest/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import (
"github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient"
"github.com/DataDog/datadog-agent/comp/otelcol/otlp/testutil"
compression "github.com/DataDog/datadog-agent/comp/serializer/compression/def"
compressionfx "github.com/DataDog/datadog-agent/comp/serializer/compression/fx-factory"
compressionfx "github.com/DataDog/datadog-agent/comp/serializer/compression/fx-mock"
implzlib "github.com/DataDog/datadog-agent/comp/serializer/compression/impl-zlib"
tracecomp "github.com/DataDog/datadog-agent/comp/trace"
traceagentcomp "github.com/DataDog/datadog-agent/comp/trace/agent/impl"
Expand Down
2 changes: 2 additions & 0 deletions pkg/aggregator/aggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/DataDog/datadog-agent/comp/forwarder/eventplatform"
orchestratorforwarder "github.com/DataDog/datadog-agent/comp/forwarder/orchestrator"
haagentmock "github.com/DataDog/datadog-agent/comp/haagent/mock"
compression "github.com/DataDog/datadog-agent/comp/serializer/compression/def"
compressionmock "github.com/DataDog/datadog-agent/comp/serializer/compression/fx-mock"
checkid "github.com/DataDog/datadog-agent/pkg/collector/check/id"
configmock "github.com/DataDog/datadog-agent/pkg/config/mock"
Expand Down Expand Up @@ -740,6 +741,7 @@ type aggregatorDeps struct {
Demultiplexer *AgentDemultiplexer
OrchestratorFwd orchestratorforwarder.Component
EventPlatformFwd eventplatform.Component
Compressor compression.Component
}

func createAggrDeps(t *testing.T) aggregatorDeps {
Expand Down
7 changes: 4 additions & 3 deletions pkg/aggregator/demultiplexer_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,10 @@ type DemultiplexerAgentTestDeps struct {
TestDeps
OrchestratorFwd orchestratorforwarder.Component
EventPlatform eventplatform.Component
Compressor compression.Factory
Tagger tagger.Component
HaAgent haagent.Component
// just changed from factory to component. Do we need both?
Compressor compression.Component
Tagger tagger.Component
HaAgent haagent.Component
}

func createDemultiplexerAgentTestDeps(t *testing.T) DemultiplexerAgentTestDeps {
Expand Down
2 changes: 1 addition & 1 deletion pkg/aggregator/demultiplexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ type internalDemutiplexerDeps struct {
TestDeps
OrchestratorForwarder orchestratorForwarder.Component
Eventplatform eventplatform.Component
Compressor compression.Factory
Compressor compression.Component
}

func createDemuxDepsWithOrchestratorFwd(
Expand Down
2 changes: 1 addition & 1 deletion pkg/aggregator/sender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func testDemux(log log.Component, hostname hostname.Component) *AgentDemultiplex
opts := DefaultAgentDemultiplexerOptions()
opts.DontStartForwarders = true
orchestratorForwarder := optional.NewOption[defaultforwarder.Forwarder](defaultforwarder.NoopForwarder{})
eventPlatformForwarder := optional.NewOptionPtr[eventplatform.Forwarder](eventplatformimpl.NewNoopEventPlatformForwarder(hostname))
eventPlatformForwarder := optional.NewOptionPtr[eventplatform.Forwarder](eventplatformimpl.NewNoopEventPlatformForwarder(hostname, compressionmock.NewMockCompressorFactory()))
demux := initAgentDemultiplexer(log, NewForwarderTest(log), &orchestratorForwarder, opts, eventPlatformForwarder, haagentmock.NewMockHaAgent(), compressionmock.NewMockCompressor(), nooptagger.NewComponent(), defaultHostname)
return demux
}
Expand Down

0 comments on commit 79246d9

Please sign in to comment.