mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
verify MaximumRetryCount for container restart policy
Signed-off-by: s00318865 <sunyuan3@huawei.com>
This commit is contained in:
parent
b6ac111abf
commit
173642c866
1 changed files with 7 additions and 0 deletions
|
@ -3229,6 +3229,13 @@ func TestRunRestartMaxRetries(t *testing.T) {
|
|||
if count != "3" {
|
||||
t.Fatalf("Container was restarted %s times, expected %d", count, 3)
|
||||
}
|
||||
MaximumRetryCount, err := inspectField(id, "HostConfig.RestartPolicy.MaximumRetryCount")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if MaximumRetryCount != "3" {
|
||||
t.Fatalf("Container Maximum Retry Count is %s, expected %s", MaximumRetryCount, "3")
|
||||
}
|
||||
logDone("run - test max-retries for --restart")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue