Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Arve Knudsen <[email protected]>
  • Loading branch information
aknuds1 committed Nov 15, 2024
1 parent a060b5a commit e2b4693
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions promql/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3946,47 +3946,47 @@ load 5m
another_metric{env="1"} 60 120 180
# Does not drop __name__ for vector selector
eval instant at 15m metric{env="1"}
eval instant at 10m metric{env="1"}
metric{env="1"} 120
# Drops __name__ for unary operators
eval instant at 15m -metric
eval instant at 10m -metric
{env="1"} -120
# Drops __name__ for binary operators
eval instant at 15m metric + another_metric
eval instant at 10m metric + another_metric
{env="1"} 300
# Does not drop __name__ for binary comparison operators
eval instant at 15m metric <= another_metric
eval instant at 10m metric <= another_metric
metric{env="1"} 120
# Drops __name__ for binary comparison operators with "bool" modifier
eval instant at 15m metric <= bool another_metric
eval instant at 10m metric <= bool another_metric
{env="1"} 1
# Drops __name__ for vector-scalar operations
eval instant at 15m metric * 2
eval instant at 10m metric * 2
{env="1"} 240
# Drops __name__ for instant-vector functions
eval instant at 15m clamp(metric, 0, 100)
eval instant at 10m clamp(metric, 0, 100)
{env="1"} 100
# Drops __name__ for round function
eval instant at 15m round(metric)
eval instant at 10m round(metric)
{env="1"} 120
# Drops __name__ for range-vector functions
eval instant at 15m rate(metric{env="1"}[10m])
eval instant at 10m rate(metric{env="1"}[10m])
{env="1"} 0.2
# Does not drop __name__ for last_over_time function
eval instant at 15m last_over_time(metric{env="1"}[10m])
eval instant at 10m last_over_time(metric{env="1"}[10m])
metric{env="1"} 120
# Drops name for other _over_time functions
eval instant at 15m max_over_time(metric{env="1"}[10m])
eval instant at 10m max_over_time(metric{env="1"}[10m])
{env="1"} 120
`, engine)
}
2 changes: 1 addition & 1 deletion promql/promqltest/testdata/name_label_dropping.test
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ eval instant at 10m clamp(metric, 0, 100)
{env="1"} 100

# Drops __name__ for round function
eval instant at 15m round(metric)
eval instant at 10m round(metric)
{env="1"} 120

# Drops __name__ for range-vector functions
Expand Down

0 comments on commit e2b4693

Please sign in to comment.