-
Notifications
You must be signed in to change notification settings - Fork 0
/
components_test.go
39 lines (31 loc) · 1.15 KB
/
components_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
33
34
35
36
37
38
39
// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT.
package main
import (
"testing"
"github.com/stretchr/testify/assert"
"go.opentelemetry.io/collector/component/componenttest"
)
func TestValidateConfigs(t *testing.T) {
factories, err := components()
assert.NoError(t, err)
for k, factory := range factories.Receivers {
assert.Equal(t, k, factory.Type())
assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
}
for k, factory := range factories.Processors {
assert.Equal(t, k, factory.Type())
assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
}
for k, factory := range factories.Exporters {
assert.Equal(t, k, factory.Type())
assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
}
for k, factory := range factories.Connectors {
assert.Equal(t, k, factory.Type())
assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
}
for k, factory := range factories.Extensions {
assert.Equal(t, k, factory.Type())
assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
}
}