1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Verify MaximumRetryCount=0 if the restart policy is always.

Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
This commit is contained in:
Yuan Sun 2015-03-30 09:07:58 +08:00
parent 41e47bbf34
commit f5310f403d

View file

@ -191,6 +191,16 @@ func TestRestartPolicyAlways(t *testing.T) {
t.Fatalf("Container restart policy name is %s, expected %s", name, "always") t.Fatalf("Container restart policy name is %s, expected %s", name, "always")
} }
MaximumRetryCount, err := inspectField(id, "HostConfig.RestartPolicy.MaximumRetryCount")
if err != nil {
t.Fatal(err)
}
// MaximumRetryCount=0 if the restart policy is always
if MaximumRetryCount != "0" {
t.Fatalf("Container Maximum Retry Count is %s, expected %s", MaximumRetryCount, "0")
}
logDone("restart - recording restart policy name for --restart=always") logDone("restart - recording restart policy name for --restart=always")
} }