Skip to content

Commit

Permalink
[chore][exporter/splunk_hec] Explicit check for component.Type in test (
Browse files Browse the repository at this point in the history
#31015)

**Description:** 

Explicit uses `component.Type` when building string to compare to in
test.
Remove comment that will soon be outdated about the component.Type.

**Link to tracking Issue:** Needed for
open-telemetry/opentelemetry-collector/pull/9414
  • Loading branch information
mx-psi authored Feb 2, 2024
1 parent 952bfd8 commit 9e6cd97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions exporter/splunkhecexporter/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1394,8 +1394,10 @@ func TestHeartbeatStartupFailed(t *testing.T) {
params := exportertest.NewNopCreateSettings()
exporter, err := factory.CreateTracesExporter(context.Background(), params, cfg)
assert.NoError(t, err)
// The exporter's name is "" while generating default params
assert.EqualError(t, exporter.Start(context.Background(), componenttest.NewNopHost()), ": heartbeat on startup failed: HTTP 403 \"Forbidden\"")
assert.EqualError(t,
exporter.Start(context.Background(), componenttest.NewNopHost()),
fmt.Sprintf("%s: heartbeat on startup failed: HTTP 403 \"Forbidden\"", params.ID.Type()),
)
}

func TestHeartbeatStartupPass_Disabled(t *testing.T) {
Expand Down

0 comments on commit 9e6cd97

Please sign in to comment.