parse service check body

This commit is contained in:
Mahmood Ali
2021-07-22 15:34:23 -04:00
parent dd6ee3f27b
commit f352490687
3 changed files with 3 additions and 0 deletions

View File

@@ -994,6 +994,7 @@ func parseChecks(service *api.Service, checkObjs *ast.ObjectList) error {
"success_before_passing",
"failures_before_critical",
"on_update",
"body",
}
if err := checkHCLKeys(co.Val, valid); err != nil {
return multierror.Prefix(err, "check ->")

View File

@@ -1198,6 +1198,7 @@ func TestParse(t *testing.T) {
InitialStatus: "passing",
TaskName: "foo",
OnUpdate: "ignore",
Body: "post body",
},
},
},

View File

@@ -25,6 +25,7 @@ job "group_service_check_script" {
initial_status = "passing"
task = "foo"
on_update = "ignore"
body = "post body"
}
}