Skip to content

Commit 472224a

Browse files
committed
Add failing test
Signed-off-by: 🌲 Harry 🌊 John 🏔 <[email protected]>
1 parent accbf08 commit 472224a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

engine/engine_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,15 @@ func TestQueriesAgainstOldEngine(t *testing.T) {
245245
http_requests_total{pod="nginx-2", route="/"} -108+173.00x40`,
246246
query: `predict_linear(http_requests_total{route="/"}[1h:1m] offset 1m, 60)`,
247247
},
248+
{
249+
name: "predict_linear correctness",
250+
load: `load 30s
251+
http_requests_total{pod="nginx-1"} 1+1.1x10
252+
http_requests_total{pod="nginx-2"} 2+2.3x50`,
253+
query: `predict_linear({__name__="http_requests_total", pod!~"nginx-1"}[5m] @ start(), -0.37690610678629094)`,
254+
end: time.Unix(600, 0),
255+
start: time.Unix(300, 0),
256+
},
248257
{
249258
name: "duplicate label fuzz",
250259
load: `load 30s

0 commit comments

Comments
 (0)