factory_test.go 521 B

123456789101112131415161718192021222324
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. package filereceiver
  4. import (
  5. "context"
  6. "testing"
  7. "github.com/stretchr/testify/require"
  8. "go.opentelemetry.io/collector/consumer/consumertest"
  9. "go.opentelemetry.io/collector/receiver/receivertest"
  10. )
  11. func TestNewFactory(t *testing.T) {
  12. f := NewFactory()
  13. _, err := f.CreateMetricsReceiver(
  14. context.Background(),
  15. receivertest.NewNopCreateSettings(),
  16. f.CreateDefaultConfig(),
  17. consumertest.NewNop(),
  18. )
  19. require.NoError(t, err)
  20. }