From d917da50c1c51a98a4da8c0bcfc8bbd09ebe5c92 Mon Sep 17 00:00:00 2001 From: james hughes Date: Wed, 25 Sep 2024 01:38:15 +0000 Subject: [PATCH] re-run generate-metrics --- .../generated_component_test.go | 12 ++++++------ .../internal/metadata/generated_status.go | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/internal/receiver/signalfxgatewayprometheusremotewritereceiver/generated_component_test.go b/internal/receiver/signalfxgatewayprometheusremotewritereceiver/generated_component_test.go index 5cdb07b7c4..19a52afbb3 100644 --- a/internal/receiver/signalfxgatewayprometheusremotewritereceiver/generated_component_test.go +++ b/internal/receiver/signalfxgatewayprometheusremotewritereceiver/generated_component_test.go @@ -27,13 +27,13 @@ func TestComponentLifecycle(t *testing.T) { factory := NewFactory() tests := []struct { - createFn func(ctx context.Context, set receiver.Settings, cfg component.Config) (component.Component, error) name string + createFn func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) }{ { name: "metrics", - createFn: func(ctx context.Context, set receiver.Settings, cfg component.Config) (component.Component, error) { + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { return factory.CreateMetricsReceiver(ctx, set, cfg, consumertest.NewNop()) }, }, @@ -44,23 +44,23 @@ func TestComponentLifecycle(t *testing.T) { cfg := factory.CreateDefaultConfig() sub, err := cm.Sub("tests::config") require.NoError(t, err) - require.NoError(t, sub.Unmarshal(&cfg)) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) for _, test := range tests { t.Run(test.name+"-shutdown", func(t *testing.T) { - c, err := test.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + c, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) require.NoError(t, err) err = c.Shutdown(context.Background()) require.NoError(t, err) }) t.Run(test.name+"-lifecycle", func(t *testing.T) { - firstRcvr, err := test.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + firstRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) require.NoError(t, err) host := componenttest.NewNopHost() require.NoError(t, err) require.NoError(t, firstRcvr.Start(context.Background(), host)) require.NoError(t, firstRcvr.Shutdown(context.Background())) - secondRcvr, err := test.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + secondRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) require.NoError(t, err) require.NoError(t, secondRcvr.Start(context.Background(), host)) require.NoError(t, secondRcvr.Shutdown(context.Background())) diff --git a/internal/receiver/signalfxgatewayprometheusremotewritereceiver/internal/metadata/generated_status.go b/internal/receiver/signalfxgatewayprometheusremotewritereceiver/internal/metadata/generated_status.go index d8b25c8c97..8d50b5ceda 100644 --- a/internal/receiver/signalfxgatewayprometheusremotewritereceiver/internal/metadata/generated_status.go +++ b/internal/receiver/signalfxgatewayprometheusremotewritereceiver/internal/metadata/generated_status.go @@ -7,8 +7,7 @@ import ( ) var ( - Type = component.MustNewType("signalfxgatewayprometheusremotewrite") - ScopeName = "github.com/signalfx/splunk-otel-collector/internal/receiver/signalfxgatewayprometheusremotewritereceiver" + Type = component.MustNewType("signalfxgatewayprometheusremotewrite") ) const (