-
Notifications
You must be signed in to change notification settings - Fork 555
Add more precise matching to the metric end-to-end tests. #1610
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 more precise matching to the metric end-to-end tests. #1610
Conversation
The metric tests scrape metrics in the Prometheus text format and have been mainly asserting based on the presence or absence of substrings within the entire response body. Metrics are now parsed into a slice of structs, and there is a new Gomega matcher that can reference metric family, labels, and value (for untyped metrics, gauges, and counters).
/retest |
nice! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet. Had a single nit, but I don't think it should hold this up.
/lgtm
|
||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
io_prometheus_client "github.com/prometheus/client_model/go" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Is there a reason for the snake_case? AFAIK it's not conventional for import aliases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package is actually generated by protobuf, so io_prometheus_client
is its real name. I can sneak in a human-friendly import alias in a separate PR.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: benluddy, njhale The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
16 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
The metric tests scrape metrics in the Prometheus text format and have
been mainly asserting based on the presence or absence of substrings
within the entire response body.
Metrics are now parsed into a slice of structs, and there is a new
Gomega matcher that can reference metric family, labels, and
value (for untyped metrics, gauges, and counters).