Debian Codegraph @

consumer/consumertest/nop_test.go

raw symbols SCIP
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 package consumertest
5
6 import (
7 "context"
8 "testing"
9
10 "github.com/stretchr/testify/assert"
11 "github.com/stretchr/testify/require"
12
13 "go.opentelemetry.io/collector/pdata/plog"
14 "go.opentelemetry.io/collector/pdata/pmetric"
15 "go.opentelemetry.io/collector/pdata/pprofile"
16 "go.opentelemetry.io/collector/pdata/ptrace"
17 )
18
19 func TestNop(t *testing.T) {
20 nc := NewNop()
21 require.NotNil(t, nc)
22 assert.NotPanics(t, nc.unexported)
23 assert.NoError(t, nc.ConsumeLogs(context.Background(), plog.NewLogs()))
24 assert.NoError(t, nc.ConsumeMetrics(context.Background(), pmetric.NewMetrics()))
25 assert.NoError(t, nc.ConsumeTraces(context.Background(), ptrace.NewTraces()))
26 assert.NoError(t, nc.ConsumeProfiles(context.Background(), pprofile.NewProfiles()))
27 }