Skip to content

Commit

Permalink
Add check_restart to jobspec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
schmichael committed Sep 14, 2017
1 parent 8947a0d commit cc00747
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jobspec/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ func TestParse(t *testing.T) {
PortLabel: "admin",
Interval: 10 * time.Second,
Timeout: 2 * time.Second,
CheckRestart: &api.CheckRestart{
Limit: 3,
Grace: helper.TimeToPtr(10 * time.Second),
IgnoreWarnings: true,
},
},
},
},
Expand Down
6 changes: 6 additions & 0 deletions jobspec/test-fixtures/basic.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ job "binstore-storagelocker" {
interval = "10s"
timeout = "2s"
port = "admin"

check_restart {
limit = 3
grace_period = "10s"
ignore_warnings = true
}
}
}

Expand Down

0 comments on commit cc00747

Please sign in to comment.