factory_test.go 573 B

123456789101112131415161718192021
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. package aerospikereceiver_test
  4. import (
  5. "testing"
  6. "time"
  7. "github.com/stretchr/testify/require"
  8. "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver"
  9. )
  10. func TestNewFactory(t *testing.T) {
  11. factory := aerospikereceiver.NewFactory()
  12. require.Equal(t, "aerospike", string(factory.Type()))
  13. cfg := factory.CreateDefaultConfig().(*aerospikereceiver.Config)
  14. require.Equal(t, time.Minute, cfg.CollectionInterval)
  15. require.False(t, cfg.CollectClusterMetrics)
  16. }