also don't allow negative intervalseconds (#34319)

This commit is contained in:
David Parrott
2021-05-19 09:05:32 -07:00
committed by GitHub
parent ec9b4806d8
commit a0f175c7a5
3 changed files with 11 additions and 13 deletions
@@ -633,7 +633,7 @@ func TestAlertRuleCRUD(t *testing.T) {
},
},
},
expectedResponse: `{"error":"invalid alert rule: interval (1s) should be divided exactly by scheduler interval: 10s", "message":"failed to update rule group"}`,
expectedResponse: `{"error":"invalid alert rule: interval (1s) should be non-zero and divided exactly by scheduler interval: 10s", "message":"failed to update rule group"}`,
},
{
desc: "alert rule with unknown datasource",