Skip to content

Commit

Permalink
Increase components test in the builder generated code
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu committed Jan 25, 2023
1 parent 6f1cbd8 commit 795d9b0
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions cmd/builder/internal/builder/templates/components_test.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,28 @@ func TestValidateConfigs(t *testing.T) {
factories, err := components()
assert.NoError(t, err)

for _, factory := range factories.Receivers {
for k, factory := range factories.Receivers {
assert.Equal(t, k, factory.Type())
assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
}
for _, factory := range factories.Processors {

for k, factory := range factories.Processors {
assert.Equal(t, k, factory.Type())
assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
}
for _, factory := range factories.Exporters {

for k, factory := range factories.Exporters {
assert.Equal(t, k, factory.Type())
assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
}
for _, factory := range factories.Extensions {

for k, factory := range factories.Connectors {
assert.Equal(t, k, factory.Type())
assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
}
for _, factory := range factories.Connectors {

for k, factory := range factories.Extensions {
assert.Equal(t, k, factory.Type())
assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
}
}

0 comments on commit 795d9b0

Please sign in to comment.