Skip to content

Move the lifecycle tests with to each component module #27849

Closed
@dmitryax

Description

Move lifecycle tests from cmd/otelcolcontrib to each module as individual generated tests.

mdatagen tool can be used for to generate the tests. We would need another section in the metadata.yaml as a source for the generated tests. Sample section:

tests:
  config: // {} by default
    endpoint: http://127.0.0.1
    region: local
    queue:
      enabled: false
    retry:
      enabled: false
  skip_lifecycle: false // false by default
  expect_consumer_error: true // false by default

Moving the tests to the components provides us exposure to the internals of the component, which can help us improve the test coverage and eliminate the need for the 'skip_lifecycle' option. Presently, certain components cannot accommodate test configurations that pass lifecycle tests, hence the necessity of retaining the 'skip_lifecycle' option. Looking ahead, we should be able to utilize internal helpers, not accessible through the public config interface, to ensure proper lifecycle validation and consequently eliminate the need for 'skip_lifecycle'."

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions