Add jobspec test for check method/header

This commit is contained in:
Michael Schurter 2017-08-15 17:17:11 -07:00
parent 4e72a8dedf
commit a4029a7948
2 changed files with 11 additions and 0 deletions

View File

@ -450,9 +450,14 @@ func TestParse(t *testing.T) {
{
Name: "check-name",
Type: "http",
Path: "/",
Interval: 10 * time.Second,
Timeout: 2 * time.Second,
InitialStatus: capi.HealthPassing,
Method: "POST",
Header: map[string][]string{
"Authorization": {"Basic ZWxhc3RpYzpjaGFuZ2VtZQ=="},
},
},
},
},

View File

@ -11,9 +11,15 @@ job "check_initial_status" {
check {
name = "check-name"
type = "http"
path = "/"
method = "POST"
interval = "10s"
timeout = "2s"
initial_status = "passing"
header {
Authorization = ["Basic ZWxhc3RpYzpjaGFuZ2VtZQ=="]
}
}
}
}