factory_test.go 665 B

123456789101112131415161718192021222324252627282930
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. package awscontainerinsightreceiver
  4. import (
  5. "context"
  6. "testing"
  7. "github.com/stretchr/testify/assert"
  8. "github.com/stretchr/testify/require"
  9. "go.opentelemetry.io/collector/consumer/consumertest"
  10. "go.opentelemetry.io/collector/receiver/receivertest"
  11. )
  12. func TestNewFactory(t *testing.T) {
  13. c := NewFactory()
  14. assert.NotNil(t, c)
  15. }
  16. func TestCreateMetricsReceiver(t *testing.T) {
  17. metricsReceiver, _ := createMetricsReceiver(
  18. context.Background(),
  19. receivertest.NewNopCreateSettings(),
  20. createDefaultConfig(),
  21. consumertest.NewNop(),
  22. )
  23. require.NotNil(t, metricsReceiver)
  24. }