Add openmetricstest parse positive and negative test cases#167
Merged
robskillington merged 4 commits intomasterfrom Nov 24, 2020
Merged
Add openmetricstest parse positive and negative test cases#167robskillington merged 4 commits intomasterfrom
robskillington merged 4 commits intomasterfrom
Conversation
Contributor
brian-brazil
left a comment
There was a problem hiding this comment.
This looks to be missing the roundtrip, plus prometheus/client_python#602
CI is also not happy.
| # TYPE a gauge | ||
| # HELP a help | ||
| a 1 | ||
| # EOF |
Contributor
There was a problem hiding this comment.
Are you sure there's no newline here?
Contributor
Author
There was a problem hiding this comment.
Looks good:
$ xxd tests/testdata/parsers/no_newline_after_eof/metrics.txt
00000000: 2320 5459 5045 2061 2067 6175 6765 0a23 # TYPE a gauge.#
00000010: 2048 454c 5020 6120 6865 6c70 0a61 2031 HELP a help.a 1
00000020: 0a23 2045 4f46 .# EOF
$ xxd tests/testdata/parsers/simple_counter/metrics.txt
00000000: 2320 5459 5045 2061 2063 6f75 6e74 6572 # TYPE a counter
00000010: 0a23 2048 454c 5020 6120 6865 6c70 0a61 .# HELP a help.a
00000020: 5f74 6f74 616c 2031 0a23 2045 4f46 0a _total 1.# EOF.
2b7aed2 to
32fb905
Compare
Contributor
Author
|
Added the roundtrip test and updated with latest changes from prometheus/client_python#602 @brian-brazil 👍 |
Contributor
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds positive and negative parse test cases from the Prometheus python client to openmetricstest and a helper to run the test cases against the Prometheus python client using docker.