From 6015403943ced9d3014c2249cbb41906e9a3fb32 Mon Sep 17 00:00:00 2001 From: Ankit Patel <8731662+ankitpatel96@users.noreply.github.com> Date: Fri, 10 May 2024 00:57:05 -0400 Subject: [PATCH] Instantiate ID in pkg/stanza/adapter tests (#32966) **Description:** In https://github.com/open-telemetry/opentelemetry-collector/pull/10069, I am making Type an interface. This means the zero value of Type will be nil - which will cause this test to fail. Initializing ID instead of relying on the zero value fixes this --------- Co-authored-by: Pablo Baeyens Co-authored-by: Bogdan Drutu --- pkg/stanza/adapter/storage_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/stanza/adapter/storage_test.go b/pkg/stanza/adapter/storage_test.go index 4a3d2faf1267..d24b583a40e5 100644 --- a/pkg/stanza/adapter/storage_test.go +++ b/pkg/stanza/adapter/storage_test.go @@ -107,6 +107,7 @@ func TestFailOnNonStorageExtension(t *testing.T) { func createReceiver(t *testing.T, storageID component.ID) *receiver { params := rcvr.CreateSettings{ + ID: component.MustNewID("testreceiver"), TelemetrySettings: componenttest.NewNopTelemetrySettings(), }