Skip to content

Commit

Permalink
changed variable name in kafka receiver (#2288)
Browse files Browse the repository at this point in the history
This PR changes a variable name that gets flagged by security scanners

resolves issue #2286
  • Loading branch information
Aman Brar authored Dec 14, 2020
1 parent a16c599 commit 45c7d49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions receiver/kafkareceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ func TestCreateTraceReceiver_error(t *testing.T) {
}

func TestWithUnmarshallers(t *testing.T) {
cum := &customUnamarshaller{}
f := NewFactory(WithAddUnmarshallers(map[string]Unmarshaller{cum.Encoding(): cum}))
unmarshaller := &customUnamarshaller{}
f := NewFactory(WithAddUnmarshallers(map[string]Unmarshaller{unmarshaller.Encoding(): unmarshaller}))
cfg := createDefaultConfig().(*Config)
// disable contacting broker
cfg.Metadata.Full = false
cfg.ProtocolVersion = "2.0.0"

t.Run("custom_encoding", func(t *testing.T) {
cfg.Encoding = cum.Encoding()
cfg.Encoding = unmarshaller.Encoding()
exporter, err := f.CreateTracesReceiver(context.Background(), component.ReceiverCreateParams{}, cfg, nil)
require.NoError(t, err)
require.NotNil(t, exporter)
Expand Down

0 comments on commit 45c7d49

Please sign in to comment.