Update tests

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
This commit is contained in:
Julien Pivotto 2023-03-08 16:32:39 +01:00
parent 0c56e5d014
commit 1fd59791e1
2 changed files with 3 additions and 3 deletions

View File

@ -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]`,

View File

@ -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.
{