forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
factory_test.go
32 lines (26 loc) · 835 Bytes
/
factory_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package awscloudwatchreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver"
import (
"context"
"testing"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/receiver/receivertest"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver/internal/metadata"
)
func TestType(t *testing.T) {
factory := NewFactory()
ft := factory.Type()
require.EqualValues(t, metadata.Type, ft)
}
func TestCreateLogsReceiver(t *testing.T) {
cfg := createDefaultConfig().(*Config)
cfg.Region = "us-west-2"
_, err := NewFactory().CreateLogsReceiver(
context.Background(),
receivertest.NewNopCreateSettings(),
cfg,
nil,
)
require.NoError(t, err)
}