Skip to content

Commit

Permalink
test profiles in nop processor
Browse files Browse the repository at this point in the history
  • Loading branch information
dmathieu committed Aug 26, 2024
1 parent 5562df6 commit 7f27159
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions processor/processortest/nop_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"go.opentelemetry.io/collector/consumer/consumertest"
"go.opentelemetry.io/collector/pdata/plog"
"go.opentelemetry.io/collector/pdata/pmetric"
"go.opentelemetry.io/collector/pdata/pprofile"
"go.opentelemetry.io/collector/pdata/ptrace"
)

Expand Down Expand Up @@ -46,6 +47,13 @@ func TestNewNopFactory(t *testing.T) {
assert.NoError(t, logs.Start(context.Background(), componenttest.NewNopHost()))
assert.NoError(t, logs.ConsumeLogs(context.Background(), plog.NewLogs()))
assert.NoError(t, logs.Shutdown(context.Background()))

profiles, err := factory.CreateProfilesProcessor(context.Background(), NewNopSettings(), cfg, consumertest.NewNop())
require.NoError(t, err)
assert.Equal(t, consumer.Capabilities{MutatesData: false}, profiles.Capabilities())
assert.NoError(t, profiles.Start(context.Background(), componenttest.NewNopHost()))
assert.NoError(t, profiles.ConsumeProfiles(context.Background(), pprofile.NewProfiles()))
assert.NoError(t, profiles.Shutdown(context.Background()))
}

func TestNewNopBuilder(t *testing.T) {
Expand Down

0 comments on commit 7f27159

Please sign in to comment.