diff --git a/receiver/mongodbreceiver/config_test.go b/receiver/mongodbreceiver/config_test.go index 6a1d0f3d5..4ed3d34f3 100644 --- a/receiver/mongodbreceiver/config_test.go +++ b/receiver/mongodbreceiver/config_test.go @@ -211,7 +211,7 @@ func TestLoadConfig(t *testing.T) { sub, err := cm.Sub(component.NewIDWithName(metadata.Type, "").String()) require.NoError(t, err) - require.NoError(t, component.UnmarshalConfig(sub, cfg)) + require.NoError(t, sub.Unmarshal(cfg)) expected := factory.CreateDefaultConfig().(*Config) expected.Hosts = []confignet.AddrConfig{