@@ -17,15 +17,15 @@ import (
1717)
1818
1919func TestCreateDefaultConfig (t * testing.T ) {
20- cfg := createDefaultConfig ()
20+ cfg := createDefaultConfig ().( * Config )
2121 assert .NotNil (t , cfg , "failed to create default config" )
2222 assert .NoError (t , componenttest .CheckConfigStruct (cfg ))
2323 assert .Equal (t , configkafka .NewDefaultClientConfig (), cfg .ClientConfig )
2424 assert .Equal (t , configkafka .NewDefaultConsumerConfig (), cfg .ConsumerConfig )
2525}
2626
2727func TestCreateTraces (t * testing.T ) {
28- cfg := createDefaultConfig ()
28+ cfg := createDefaultConfig ().( * Config )
2929 cfg .Brokers = []string {"invalid:9092" }
3030 cfg .ProtocolVersion = "2.0.0"
3131 r , err := createTracesReceiver (context .Background (), receivertest .NewNopSettings (metadata .Type ), cfg , nil )
@@ -38,7 +38,7 @@ func TestWithTracesUnmarshalers(t *testing.T) {
3838 f := NewFactory ()
3939
4040 t .Run ("custom_encoding" , func (t * testing.T ) {
41- cfg := createDefaultConfig ()
41+ cfg := createDefaultConfig ().( * Config )
4242 cfg .Traces .Encoding = "custom"
4343 receiver , err := f .CreateTraces (context .Background (), receivertest .NewNopSettings (metadata .Type ), cfg , nil )
4444 tracesConsumer , ok := receiver .(* kafkaConsumer )
@@ -59,7 +59,7 @@ func TestWithTracesUnmarshalers(t *testing.T) {
5959}
6060
6161func TestCreateMetrics (t * testing.T ) {
62- cfg := createDefaultConfig ()
62+ cfg := createDefaultConfig ().( * Config )
6363 cfg .Brokers = []string {"invalid:9092" }
6464 cfg .ProtocolVersion = "2.0.0"
6565 r , err := createMetricsReceiver (context .Background (), receivertest .NewNopSettings (metadata .Type ), cfg , nil )
@@ -72,7 +72,7 @@ func TestWithMetricsUnmarshalers(t *testing.T) {
7272 f := NewFactory ()
7373
7474 t .Run ("custom_encoding" , func (t * testing.T ) {
75- cfg := createDefaultConfig ()
75+ cfg := createDefaultConfig ().( * Config )
7676 cfg .Metrics .Encoding = "custom"
7777 receiver , err := f .CreateMetrics (context .Background (), receivertest .NewNopSettings (metadata .Type ), cfg , nil )
7878 metricsConsumer , ok := receiver .(* kafkaConsumer )
@@ -93,7 +93,7 @@ func TestWithMetricsUnmarshalers(t *testing.T) {
9393}
9494
9595func TestCreateLogs (t * testing.T ) {
96- cfg := createDefaultConfig ()
96+ cfg := createDefaultConfig ().( * Config )
9797 cfg .Brokers = []string {"invalid:9092" }
9898 cfg .ProtocolVersion = "2.0.0"
9999 r , err := createLogsReceiver (context .Background (), receivertest .NewNopSettings (metadata .Type ), cfg , nil )
@@ -106,7 +106,7 @@ func TestWithLogsUnmarshalers(t *testing.T) {
106106 f := NewFactory ()
107107
108108 t .Run ("custom_encoding" , func (t * testing.T ) {
109- cfg := createDefaultConfig ()
109+ cfg := createDefaultConfig ().( * Config )
110110 cfg .Logs .Encoding = "custom"
111111 receiver , err := f .CreateLogs (context .Background (), receivertest .NewNopSettings (metadata .Type ), cfg , nil )
112112 logsConsumer , ok := receiver .(* kafkaConsumer )
0 commit comments