components_test.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT.
  2. package main
  3. import (
  4. "testing"
  5. "github.com/stretchr/testify/assert"
  6. "go.opentelemetry.io/collector/component/componenttest"
  7. )
  8. func TestValidateConfigs(t *testing.T) {
  9. factories, err := components()
  10. assert.NoError(t, err)
  11. for k, factory := range factories.Receivers {
  12. assert.Equal(t, k, factory.Type())
  13. assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
  14. }
  15. for k, factory := range factories.Processors {
  16. assert.Equal(t, k, factory.Type())
  17. assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
  18. }
  19. for k, factory := range factories.Exporters {
  20. assert.Equal(t, k, factory.Type())
  21. assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
  22. }
  23. for k, factory := range factories.Connectors {
  24. assert.Equal(t, k, factory.Type())
  25. assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
  26. }
  27. for k, factory := range factories.Extensions {
  28. assert.Equal(t, k, factory.Type())
  29. assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig()))
  30. }
  31. }