@@ -37,7 +37,7 @@ func TestUnmarshalDefaultConfig(t *testing.T) {
37
37
require .NoError (t , err )
38
38
factory := NewFactory ()
39
39
cfg := factory .CreateDefaultConfig ()
40
- assert .NoError (t , component .UnmarshalReceiverConfig (cm , cfg ))
40
+ assert .NoError (t , component .UnmarshalConfig (cm , cfg ))
41
41
assert .Equal (t , factory .CreateDefaultConfig (), cfg )
42
42
}
43
43
@@ -46,7 +46,7 @@ func TestUnmarshalConfigOnlyGRPC(t *testing.T) {
46
46
require .NoError (t , err )
47
47
factory := NewFactory ()
48
48
cfg := factory .CreateDefaultConfig ()
49
- assert .NoError (t , component .UnmarshalReceiverConfig (cm , cfg ))
49
+ assert .NoError (t , component .UnmarshalConfig (cm , cfg ))
50
50
51
51
defaultOnlyGRPC := factory .CreateDefaultConfig ().(* Config )
52
52
defaultOnlyGRPC .HTTP = nil
@@ -58,7 +58,7 @@ func TestUnmarshalConfigOnlyHTTP(t *testing.T) {
58
58
require .NoError (t , err )
59
59
factory := NewFactory ()
60
60
cfg := factory .CreateDefaultConfig ()
61
- assert .NoError (t , component .UnmarshalReceiverConfig (cm , cfg ))
61
+ assert .NoError (t , component .UnmarshalConfig (cm , cfg ))
62
62
63
63
defaultOnlyHTTP := factory .CreateDefaultConfig ().(* Config )
64
64
defaultOnlyHTTP .GRPC = nil
@@ -70,7 +70,7 @@ func TestUnmarshalConfigOnlyHTTPNull(t *testing.T) {
70
70
require .NoError (t , err )
71
71
factory := NewFactory ()
72
72
cfg := factory .CreateDefaultConfig ()
73
- assert .NoError (t , component .UnmarshalReceiverConfig (cm , cfg ))
73
+ assert .NoError (t , component .UnmarshalConfig (cm , cfg ))
74
74
75
75
defaultOnlyHTTP := factory .CreateDefaultConfig ().(* Config )
76
76
defaultOnlyHTTP .GRPC = nil
@@ -82,7 +82,7 @@ func TestUnmarshalConfigOnlyHTTPEmptyMap(t *testing.T) {
82
82
require .NoError (t , err )
83
83
factory := NewFactory ()
84
84
cfg := factory .CreateDefaultConfig ()
85
- assert .NoError (t , component .UnmarshalReceiverConfig (cm , cfg ))
85
+ assert .NoError (t , component .UnmarshalConfig (cm , cfg ))
86
86
87
87
defaultOnlyHTTP := factory .CreateDefaultConfig ().(* Config )
88
88
defaultOnlyHTTP .GRPC = nil
@@ -94,7 +94,7 @@ func TestUnmarshalConfig(t *testing.T) {
94
94
require .NoError (t , err )
95
95
factory := NewFactory ()
96
96
cfg := factory .CreateDefaultConfig ()
97
- assert .NoError (t , component .UnmarshalReceiverConfig (cm , cfg ))
97
+ assert .NoError (t , component .UnmarshalConfig (cm , cfg ))
98
98
assert .Equal (t ,
99
99
& Config {
100
100
ReceiverSettings : config .NewReceiverSettings (component .NewID (typeStr )),
@@ -151,7 +151,7 @@ func TestUnmarshalConfigUnix(t *testing.T) {
151
151
require .NoError (t , err )
152
152
factory := NewFactory ()
153
153
cfg := factory .CreateDefaultConfig ()
154
- assert .NoError (t , component .UnmarshalReceiverConfig (cm , cfg ))
154
+ assert .NoError (t , component .UnmarshalConfig (cm , cfg ))
155
155
assert .Equal (t ,
156
156
& Config {
157
157
ReceiverSettings : config .NewReceiverSettings (component .NewID (typeStr )),
@@ -176,29 +176,29 @@ func TestUnmarshalConfigTypoDefaultProtocol(t *testing.T) {
176
176
require .NoError (t , err )
177
177
factory := NewFactory ()
178
178
cfg := factory .CreateDefaultConfig ()
179
- assert .EqualError (t , component .UnmarshalReceiverConfig (cm , cfg ), "1 error(s) decoding:\n \n * 'protocols' has invalid keys: htttp" )
179
+ assert .EqualError (t , component .UnmarshalConfig (cm , cfg ), "1 error(s) decoding:\n \n * 'protocols' has invalid keys: htttp" )
180
180
}
181
181
182
182
func TestUnmarshalConfigInvalidProtocol (t * testing.T ) {
183
183
cm , err := confmaptest .LoadConf (filepath .Join ("testdata" , "bad_proto_config.yaml" ))
184
184
require .NoError (t , err )
185
185
factory := NewFactory ()
186
186
cfg := factory .CreateDefaultConfig ()
187
- assert .EqualError (t , component .UnmarshalReceiverConfig (cm , cfg ), "1 error(s) decoding:\n \n * 'protocols' has invalid keys: thrift" )
187
+ assert .EqualError (t , component .UnmarshalConfig (cm , cfg ), "1 error(s) decoding:\n \n * 'protocols' has invalid keys: thrift" )
188
188
}
189
189
190
190
func TestUnmarshalConfigEmptyProtocols (t * testing.T ) {
191
191
cm , err := confmaptest .LoadConf (filepath .Join ("testdata" , "bad_no_proto_config.yaml" ))
192
192
require .NoError (t , err )
193
193
factory := NewFactory ()
194
194
cfg := factory .CreateDefaultConfig ()
195
- assert .NoError (t , component .UnmarshalReceiverConfig (cm , cfg ))
195
+ assert .NoError (t , component .UnmarshalConfig (cm , cfg ))
196
196
assert .EqualError (t , component .ValidateConfig (cfg ), "must specify at least one protocol when using the OTLP receiver" )
197
197
}
198
198
199
199
func TestUnmarshalConfigEmpty (t * testing.T ) {
200
200
factory := NewFactory ()
201
201
cfg := factory .CreateDefaultConfig ()
202
- assert .NoError (t , component .UnmarshalReceiverConfig (confmap .New (), cfg ))
202
+ assert .NoError (t , component .UnmarshalConfig (confmap .New (), cfg ))
203
203
assert .EqualError (t , component .ValidateConfig (cfg ), "must specify at least one protocol when using the OTLP receiver" )
204
204
}
0 commit comments