From 08397a8d523820b850615a49b12f51b887d7ff47 Mon Sep 17 00:00:00 2001 From: Roger Coll Date: Fri, 10 May 2024 16:29:05 +0200 Subject: [PATCH] fix linter --- receiver/podmanreceiver/factory.go | 2 +- receiver/podmanreceiver/receiver_test.go | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/receiver/podmanreceiver/factory.go b/receiver/podmanreceiver/factory.go index c07df858a585..cc5221f899fb 100644 --- a/receiver/podmanreceiver/factory.go +++ b/receiver/podmanreceiver/factory.go @@ -44,7 +44,7 @@ func createDefaultReceiverConfig() component.Config { } func createMetricsReceiver( - ctx context.Context, + _ context.Context, params receiver.CreateSettings, config component.Config, consumer consumer.Metrics, diff --git a/receiver/podmanreceiver/receiver_test.go b/receiver/podmanreceiver/receiver_test.go index 63766599a58c..8db911c00bc5 100644 --- a/receiver/podmanreceiver/receiver_test.go +++ b/receiver/podmanreceiver/receiver_test.go @@ -15,8 +15,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/receiver/receivertest" "go.opentelemetry.io/collector/receiver/scraperhelper" "go.uber.org/zap" @@ -99,8 +97,6 @@ func (c mockClient) ping(context.Context) error { return nil } -type mockConsumer chan pmetric.Metrics - func (c mockClient) list(context.Context, url.Values) ([]container, error) { return []container{{ID: "c1", Image: "localimage"}}, nil } @@ -108,12 +104,3 @@ func (c mockClient) list(context.Context, url.Values) ([]container, error) { func (c mockClient) events(context.Context, url.Values) (<-chan event, <-chan error) { return nil, nil } - -func (m mockConsumer) Capabilities() consumer.Capabilities { - return consumer.Capabilities{} -} - -func (m mockConsumer) ConsumeMetrics(_ context.Context, md pmetric.Metrics) error { - m <- md - return nil -}