From 3494fbcd6313a66557bae75e16af9addfbde3ea6 Mon Sep 17 00:00:00 2001 From: shalper2 Date: Mon, 25 Sep 2023 14:15:28 -0500 Subject: [PATCH] cleaned up mockHost --- receiver/splunkenterprisereceiver/client_test.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/receiver/splunkenterprisereceiver/client_test.go b/receiver/splunkenterprisereceiver/client_test.go index 2e2b4306e07a..c6db8b9553ef 100644 --- a/receiver/splunkenterprisereceiver/client_test.go +++ b/receiver/splunkenterprisereceiver/client_test.go @@ -17,6 +17,8 @@ import ( "go.opentelemetry.io/collector/receiver/scraperhelper" ) +// mockHost allows us to create a test host with a no op extension that can be used to satisfy the SDK without having to parse from an +// actual config.yaml. type mockHost struct { component.Host extensions map[component.ID]component.Component @@ -26,16 +28,6 @@ func (m *mockHost) GetExtensions() map[component.ID]component.Component { return m.extensions } -func (m *mockHost) ReportFatalError(_ error) {} - -func (m *mockHost) GetFactory(_ component.Kind, _ component.Type) component.Factory { - return nil -} - -func (m *mockHost) GetExporters() map[component.DataType]map[component.ID]component.Component { - return nil -} - func TestClientCreation(t *testing.T) { cfg := &Config{ HTTPClientSettings: confighttp.HTTPClientSettings{