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

[chore] Fix filelog receiver test with new component.ValidateConfig behavior #37448

Conversation

evan-bradley
Copy link
Contributor

@evan-bradley evan-bradley commented Jan 23, 2025

Description

component.ValidateConfig now validates interfaces. The (*helper.TimeParser).Validate method is now called while validating FileLogConfig and as a result, the struct is modified during validation. The simplest fix seemed to be to apply these same changes to the expected config struct by calling Validate on it, even though the assertion logic in the test now feels a little circular.

I can try to refactor the struct a bit to make it more directly testable if desired.

This is needed for #37447.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @evan-bradley, looks like some checks need to be fixed

@codeboten
Copy link
Contributor

Oh i see, this is merging into a branch... got it

@codeboten codeboten merged commit 65ec900 into open-telemetry:opentelemetrybot/update-otel-1737650898 Jan 24, 2025
145 of 154 checks passed
@github-actions github-actions bot added this to the next release milestone Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants