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

MQE: enable supported upstream tests #10045

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/streamingpromql/testdata/upstream/functions.test
Original file line number Diff line number Diff line change
Expand Up @@ -1056,8 +1056,7 @@ load 5m
testmetric1{src="a",dst="b"} 0
testmetric2{src="a",dst="b"} 1

# Unsupported by streaming engine.
# eval_fail instant at 0m changes({__name__=~'testmetric1|testmetric2'}[5m])
eval_fail instant at 0m changes({__name__=~'testmetric1|testmetric2'}[5m])

# Tests for *_over_time
clear
Expand Down
5 changes: 2 additions & 3 deletions pkg/streamingpromql/testdata/upstream/histograms.test
Original file line number Diff line number Diff line change
Expand Up @@ -638,9 +638,8 @@ load_with_nhcb 5m
eval instant at 10m increase(histogram_with_reset[15m])
{} {{schema:-53 count:27 sum:91.5 custom_values:[1 2 4 8] counter_reset_hint:gauge buckets:[13.5 0 4.5 9]}}

# Unsupported by streaming engine.
# eval instant at 10m resets(histogram_with_reset[15m])
# {} 1
eval instant at 10m resets(histogram_with_reset[15m])
{} 1

eval instant at 10m histogram_count(increase(histogram_with_reset[15m]))
{} 27
Expand Down
5 changes: 2 additions & 3 deletions pkg/streamingpromql/testdata/upstream/operators.test
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ eval instant at 50m 2 - SUM(http_requests) BY (job)
eval instant at 50m -http_requests{job="api-server",instance="0",group="production"}
{job="api-server",instance="0",group="production"} -100

# Unsupported by streaming engine.
# eval instant at 50m +http_requests{job="api-server",instance="0",group="production"}
# http_requests{job="api-server",instance="0",group="production"} 100
eval instant at 50m +http_requests{job="api-server",instance="0",group="production"}
http_requests{job="api-server",instance="0",group="production"} 100

eval instant at 50m - - - SUM(http_requests) BY (job)
{job="api-server"} -1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (

var (
// These expressions are taken directly from the promqltest package, and are what it uses to parse eval commands.
patEvalInstant = regexp.MustCompile(`^eval(?:_(fail|warn|ordered))?\s+instant\s+(?:at\s+(.+?))?\s+(.+)$`)
patEvalRange = regexp.MustCompile(`^eval(?:_(fail|warn))?\s+range\s+from\s+(.+)\s+to\s+(.+)\s+step\s+(.+?)\s+(.+)$`)
patEvalInstant = regexp.MustCompile(`^eval(?:_(fail|warn|info|ordered))?\s+instant\s+(?:at\s+(.+?))?\s+(.+)$`)
patEvalRange = regexp.MustCompile(`^eval(?:_(fail|warn|info))?\s+range\s+from\s+(.+)\s+to\s+(.+)\s+step\s+(.+?)\s+(.+)$`)
)

func main() {
Expand Down