Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round 2: Adapt to randomly generated nop component names in unit tests #31659

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exporter/splunkhecexporter/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ func TestHeartbeatStartupFailed(t *testing.T) {
assert.NoError(t, err)
assert.EqualError(t,
exporter.Start(context.Background(), componenttest.NewNopHost()),
fmt.Sprintf("%s: heartbeat on startup failed: HTTP 403 \"Forbidden\"", params.ID.Type()),
fmt.Sprintf("%s: heartbeat on startup failed: HTTP 403 \"Forbidden\"", params.ID.String()),
)
assert.NoError(t, exporter.Shutdown(context.Background()))
}
Expand Down
7 changes: 4 additions & 3 deletions receiver/filelogreceiver/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ func TestStorage(t *testing.T) {
ext := storagetest.NewFileBackedStorageExtension("test", storageDir)
host := storagetest.NewStorageHost().WithExtension(ext.ID, ext)
sink := new(consumertest.LogsSink)
rcvr, err := f.CreateLogsReceiver(ctx, receivertest.NewNopCreateSettings(), cfg, sink)
set := receivertest.NewNopCreateSettings()
rcvr, err := f.CreateLogsReceiver(ctx, set, cfg, sink)
require.NoError(t, err, "failed to create receiver")
require.NoError(t, rcvr.Start(ctx, host))

Expand Down Expand Up @@ -72,7 +73,7 @@ func TestStorage(t *testing.T) {
// Start the components again
ext = storagetest.NewFileBackedStorageExtension("test", storageDir)
host = storagetest.NewStorageHost().WithExtension(ext.ID, ext)
rcvr, err = f.CreateLogsReceiver(ctx, receivertest.NewNopCreateSettings(), cfg, sink)
rcvr, err = f.CreateLogsReceiver(ctx, set, cfg, sink)
require.NoError(t, err, "failed to create receiver")
require.NoError(t, rcvr.Start(ctx, host))
sink.Reset()
Expand Down Expand Up @@ -117,7 +118,7 @@ func TestStorage(t *testing.T) {
// Start the components again
ext = storagetest.NewFileBackedStorageExtension("test", storageDir)
host = storagetest.NewStorageHost().WithExtension(ext.ID, ext)
rcvr, err = f.CreateLogsReceiver(ctx, receivertest.NewNopCreateSettings(), cfg, sink)
rcvr, err = f.CreateLogsReceiver(ctx, set, cfg, sink)
require.NoError(t, err, "failed to create receiver")
require.NoError(t, rcvr.Start(ctx, host))
sink.Reset()
Expand Down
Loading