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: Add new tests for chronicle exporter with http and grpc servers #2049

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

djaglowski
Copy link
Member

Follows #2048, another step towards #2044

This PR mostly just adds tests, but a few minor changes are made to allow specific aspects of the code to be swapped out in those tests.

Regardless of protocol, a fake tokenSource function can be replaced, allowing us to bypass the loading of google credentials. Likewise, the endpoint is changed to point to the mock server. When using grpc, the dial opts are also changed to indicate no authentication. However, even with these changes the clients are real and actually exercised by the tests.

When using http, the exporter correctly returns a permanent error on at least some error codes. More should be done here, but it is a start and can be validated by tests.

Finally, in writing these tests, I found a few error messages which should be simplified.

Overall, test coverage for the exporter is improved from about to 61% to 72%.

@djaglowski djaglowski marked this pull request as ready for review December 12, 2024 22:00
@djaglowski djaglowski requested review from dpaasman00 and a team as code owners December 12, 2024 22:00
Copy link
Contributor

@mrsillydog mrsillydog left a comment

Choose a reason for hiding this comment

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

Looks like some tests are failing, otherwise LGTM

@djaglowski
Copy link
Member Author

Looks like it was an unrelated flaky test. Passed on a second run though.

@djaglowski djaglowski merged commit 104caa3 into release/v1.67.0 Dec 16, 2024
15 checks passed
@djaglowski djaglowski deleted the split-http-grpc-4 branch December 16, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants