Remove 'SecondsOrDuration' for check_interval

Now requires an explicit duration unit. Eg. 30s
This commit is contained in:
Ian Fijolek
2023-04-19 15:31:12 -07:00
parent f3f7c215a7
commit a03f430d0e
5 changed files with 16 additions and 44 deletions
+3 -3
View File
@@ -47,15 +47,15 @@ func TestIntervalParsing(t *testing.T) {
oneMinute := time.Minute
// validate top level interval seconds represented as an int
if config.CheckInterval.Value() != oneSecond {
if config.CheckInterval != oneSecond {
t.Errorf("Incorrectly parsed int seconds. expected=%v actual=%v", oneSecond, config.CheckInterval)
}
if config.Monitors[0].CheckInterval.Value() != tenSeconds {
if config.Monitors[0].CheckInterval != tenSeconds {
t.Errorf("Incorrectly parsed seconds duration. expected=%v actual=%v", oneSecond, config.CheckInterval)
}
if config.Monitors[1].CheckInterval.Value() != oneMinute {
if config.Monitors[1].CheckInterval != oneMinute {
t.Errorf("Incorrectly parsed seconds duration. expected=%v actual=%v", oneSecond, config.CheckInterval)
}