From 1b5649bb69fb672db3838114770eb4749bacf1f8 Mon Sep 17 00:00:00 2001 From: Brian Floersch Date: Mon, 18 Dec 2023 16:10:40 -0500 Subject: [PATCH] improve --- comp/logs/agent/component.go | 1 - comp/logs/agent/mock.go | 4 ---- .../inventorychecksimpl/inventorychecks_test.go | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/comp/logs/agent/component.go b/comp/logs/agent/component.go index 4e149e4f39d99..f1f3d15638fb1 100644 --- a/comp/logs/agent/component.go +++ b/comp/logs/agent/component.go @@ -50,7 +50,6 @@ type Mock interface { Component SetSources(sources *sources.LogSources) - AsComponent() Component } // Module defines the fx options for this component. diff --git a/comp/logs/agent/mock.go b/comp/logs/agent/mock.go index c41341d59da22..3de31c29ae92c 100644 --- a/comp/logs/agent/mock.go +++ b/comp/logs/agent/mock.go @@ -91,7 +91,3 @@ func (a *mockLogsAgent) Flush(ctx context.Context) { func (a *mockLogsAgent) GetPipelineProvider() pipeline.Provider { return nil } - -func (a *mockLogsAgent) AsComponent() Component { - return a -} diff --git a/comp/metadata/inventorychecks/inventorychecksimpl/inventorychecks_test.go b/comp/metadata/inventorychecks/inventorychecksimpl/inventorychecks_test.go index e45fd59f9ee1b..6835decb5308e 100644 --- a/comp/metadata/inventorychecks/inventorychecksimpl/inventorychecks_test.go +++ b/comp/metadata/inventorychecks/inventorychecksimpl/inventorychecks_test.go @@ -145,7 +145,7 @@ func TestGetPayload(t *testing.T) { ic := getTestInventoryChecks(t, optional.NewOption[collector.Collector](mockColl), - optional.NewOption[logagent.Component](logsAgent.AsComponent()), + optional.NewOption[logagent.Component](logsAgent), overrides, )