Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmd/mdatagen] Mdatagen generates faulty test code #10866

Closed
SamerJ opened this issue Aug 13, 2024 · 0 comments · Fixed by #10882
Closed

[cmd/mdatagen] Mdatagen generates faulty test code #10866

SamerJ opened this issue Aug 13, 2024 · 0 comments · Fixed by #10882
Labels
bug Something isn't working

Comments

@SamerJ
Copy link
Contributor

SamerJ commented Aug 13, 2024

Describe the bug

Having a metadata.yaml file with disabled tests (lifecycle & shutdown), generates faulty code.
We end up with an unused import in the go test file generated_component_test.go
The specific unused import is go.opentelemetry.io/collector/confmap/confmaptest

Steps to reproduce
Any mdata yaml file with both skip_lifecycle and skip_shutdown set to true

What version did you use?
Latest (v0.107.0)

What config did you use?

type: foo
scope_name: foo

tests:
skip_lifecycle: true
skip_shutdown: true

status:
class: processor
stability:
alpha: [metrics]
distributions:
- contrib
codeowners:
active: [name]

@SamerJ SamerJ added the bug Something isn't working label Aug 13, 2024
@SamerJ SamerJ changed the title Mdatagen genrated test code is problematic Mdatagen generates faulty test code Aug 13, 2024
@SamerJ SamerJ changed the title Mdatagen generates faulty test code [cmd/mdatagen] Mdatagen generates faulty test code Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant