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 more PromQL tests #88

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

roidelapluie
Copy link
Member

Signed-off-by: Julien Pivotto roidelapluie@o11y.eu

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
@roidelapluie roidelapluie requested a review from juliusv as a code owner May 17, 2022 12:43
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
@@ -45,13 +45,22 @@ test_cases:
# TODO: Add tests for staleness support.
- query: 'demo_memory_usage_bytes'
- query: '{__name__="demo_memory_usage_bytes"}'
# Check for spacing.
- query: ' { __name__ = "demo_memory_usage_bytes" } '
Copy link
Member

Choose a reason for hiding this comment

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

Maybe put this into the lower section where we have multiple matchers, and have spaces around the comma as well?

- query: 'demo_memory_usage_bytes{type!="free"}'
- query: 'demo_memory_usage_bytes{instance=~"demo.promlabs.com:.*"}'
# Check for anchored regexes.
- query: 'demo_memory_usage_bytes{instance=~"demo.promlabs.com"}'
Copy link
Member

Choose a reason for hiding this comment

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

Now that I see it, probably for good measure we should escape the dots here and in the existing query above :)

@juliusv
Copy link
Member

juliusv commented Oct 24, 2022

Ping! :)

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