Skip to content

Commit

Permalink
[chore] Remove ReportFatalError use in host mock (#31102)
Browse files Browse the repository at this point in the history
**Description:** 
Remove `ReportFatalError` use in host mock

Fixes #30599
  • Loading branch information
atoulme committed Feb 8, 2024
1 parent 94889fb commit 80c739f
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions receiver/purefbreceiver/internal/baerertoken_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/config/configauth"
"go.opentelemetry.io/collector/extension/extensiontest"

Expand All @@ -29,6 +30,7 @@ func TestBearerToken(t *testing.T) {
baComponentName := component.NewIDWithName("bearertokenauth", "fb02")

host := &mockHost{
Host: componenttest.NewNopHost(),
extensions: map[component.ID]component.Component{
baComponentName: baExt,
},
Expand All @@ -47,19 +49,10 @@ func TestBearerToken(t *testing.T) {
}

type mockHost struct {
component.Host
extensions map[component.ID]component.Component
}

func (h *mockHost) ReportFatalError(_ error) {}

func (h *mockHost) GetFactory(_ component.Kind, _ component.Type) component.Factory {
return nil
}

func (h *mockHost) GetExtensions() map[component.ID]component.Component {
return h.extensions
}

func (h *mockHost) GetExporters() map[component.DataType]map[component.ID]component.Component {
return nil
}

0 comments on commit 80c739f

Please sign in to comment.