1234567891011121314151617181920212223242526272829 |
- // Copyright The OpenTelemetry Authors
- // SPDX-License-Identifier: Apache-2.0
- package alertmanagerexporter
- import (
- "context"
- "testing"
- "github.com/stretchr/testify/assert"
- "go.opentelemetry.io/collector/component/componenttest"
- "go.opentelemetry.io/collector/exporter/exportertest"
- )
- func TestCreateDefaultConfig(t *testing.T) {
- factory := NewFactory()
- cfg := factory.CreateDefaultConfig()
- assert.NotNil(t, cfg, "failed to create default config")
- assert.NoError(t, componenttest.CheckConfigStruct(cfg))
- }
- func TestCreateTracesExporter(t *testing.T) {
- factory := NewFactory()
- cfg := factory.CreateDefaultConfig()
- te, err := factory.CreateTracesExporter(context.Background(), exportertest.NewNopCreateSettings(), cfg)
- assert.NoError(t, err)
- assert.NotNil(t, te)
- }
|