Skip to content

Commit

Permalink
MQE: enable supported upstream tests (#10045)
Browse files Browse the repository at this point in the history
* Fix issue running `tools/check-for-disabled-but-supported-mqe-test-cases`

* Enable supported but disabled test cases
  • Loading branch information
charleskorn authored Nov 29, 2024
1 parent b14cac1 commit 060d70b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
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
4 changes: 2 additions & 2 deletions tools/check-for-disabled-but-supported-mqe-test-cases/main.go
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

0 comments on commit 060d70b

Please sign in to comment.