Skip to content

Commit

Permalink
cleaned up mockHost
Browse files Browse the repository at this point in the history
  • Loading branch information
shalper2 committed Sep 25, 2023
1 parent dc36a98 commit 3494fbc
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions receiver/splunkenterprisereceiver/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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{
Expand Down

0 comments on commit 3494fbc

Please sign in to comment.