Skip to content

Commit

Permalink
don't use deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Oct 23, 2020
1 parent 200d950 commit 0f669d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions processor/attributesprocessor/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func TestFactory_CreateMetricsProcessor(t *testing.T) {
func TestFactoryCreateLogsProcessor_EmptyActions(t *testing.T) {
factory := NewFactory()
cfg := factory.CreateDefaultConfig()
ap, err := factory.CreateLogsProcessor(context.Background(), component.ProcessorCreateParams{}, cfg, exportertest.NewNopLogsExporter())
ap, err := factory.CreateLogsProcessor(context.Background(), component.ProcessorCreateParams{}, cfg, consumertest.NewLogsNop())
assert.Error(t, err)
assert.Nil(t, ap)
}
Expand All @@ -116,7 +116,7 @@ func TestFactoryCreateLogsProcessor_InvalidActions(t *testing.T) {
oCfg.Actions = []processorhelper.ActionKeyValue{
{Key: "", Value: 123, Action: processorhelper.UPSERT},
}
ap, err := factory.CreateLogsProcessor(context.Background(), component.ProcessorCreateParams{}, cfg, exportertest.NewNopLogsExporter())
ap, err := factory.CreateLogsProcessor(context.Background(), component.ProcessorCreateParams{}, cfg, consumertest.NewLogsNop())
assert.Error(t, err)
assert.Nil(t, ap)
}
Expand All @@ -130,7 +130,7 @@ func TestFactoryCreateLogsProcessor(t *testing.T) {
}

tp, err := factory.CreateLogsProcessor(
context.Background(), component.ProcessorCreateParams{}, cfg, exportertest.NewNopLogsExporter())
context.Background(), component.ProcessorCreateParams{}, cfg, consumertest.NewLogsNop())
assert.NotNil(t, tp)
assert.NoError(t, err)

Expand All @@ -143,7 +143,7 @@ func TestFactoryCreateLogsProcessor(t *testing.T) {
{Action: processorhelper.DELETE},
}
tp, err = factory.CreateLogsProcessor(
context.Background(), component.ProcessorCreateParams{}, cfg, exportertest.NewNopLogsExporter())
context.Background(), component.ProcessorCreateParams{}, cfg, consumertest.NewLogsNop())
assert.Nil(t, tp)
assert.Error(t, err)
}

0 comments on commit 0f669d2

Please sign in to comment.