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

Add unit tests for parser #3

Merged
merged 13 commits into from
Mar 3, 2022
Merged

Conversation

carrieedwards
Copy link
Contributor

This PR adds unit tests for the parser. It also adds Makefile commands for running tests.

@carrieedwards carrieedwards marked this pull request as ready for review February 25, 2022 16:48
Copy link
Contributor

@ywwg ywwg left a comment

Choose a reason for hiding this comment

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

can you post the change in code coverage with this PR? And I'll have justin work on adding a github action so that's automatic from now on

pkg/influx/parser_test.go Show resolved Hide resolved
scripts/test.sh Outdated Show resolved Hide resolved
@carrieedwards
Copy link
Contributor Author

Code coverage improvement:

Previously, the code coverage was 0%. With these changes, here is the code coverage by method in parser.go:
parseInfluxLineReader: 88.2%
writeRequestFromInfluxPoints: 85.7%
influxPointToTimeseries: 76.7%
replaceInvalidChars: 83.3%
batchReadCloser: 100.0%

pkg/influx/parser_test.go Show resolved Hide resolved
@carrieedwards carrieedwards force-pushed the cedwards/add-parser-unit-tests branch from 0451127 to 927708c Compare March 3, 2022 18:53
@carrieedwards carrieedwards merged commit 154585b into main Mar 3, 2022
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.

None yet

2 participants