From 1fd59791e1325fd00e80c1681603319e1c359f7f Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Wed, 8 Mar 2023 16:32:39 +0100 Subject: [PATCH] Update tests Signed-off-by: Julien Pivotto --- promql/parser/parse_test.go | 2 +- scrape/manager_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/promql/parser/parse_test.go b/promql/parser/parse_test.go index 511d2d26e..df66d9381 100644 --- a/promql/parser/parse_test.go +++ b/promql/parser/parse_test.go @@ -2029,7 +2029,7 @@ var testExpr = []struct { { input: `foo[5y1hs]`, fail: true, - errMsg: "not a valid duration string: \"5y1hs\"", + errMsg: "unknown unit \"hs\" in duration \"5y1hs\"", }, { input: `foo[5m1h]`, diff --git a/scrape/manager_test.go b/scrape/manager_test.go index bd59240e2..9c60e2a03 100644 --- a/scrape/manager_test.go +++ b/scrape/manager_test.go @@ -263,7 +263,7 @@ func TestPopulateLabels(t *testing.T) { }, res: labels.EmptyLabels(), resOrig: labels.EmptyLabels(), - err: "error parsing scrape interval: not a valid duration string: \"2notseconds\"", + err: "error parsing scrape interval: unknown unit \"notseconds\" in duration \"2notseconds\"", }, // Invalid duration in timeout label. { @@ -280,7 +280,7 @@ func TestPopulateLabels(t *testing.T) { }, res: labels.EmptyLabels(), resOrig: labels.EmptyLabels(), - err: "error parsing scrape timeout: not a valid duration string: \"2notseconds\"", + err: "error parsing scrape timeout: unknown unit \"notseconds\" in duration \"2notseconds\"", }, // 0 interval in timeout label. {