Merge pull request #11913 from sunyuan3/docker_cli_restart_test
Verify MaximumRetryCount=0 if the restart policy is always. Upstream-commit: 5ab98eae3c3ef7b1c7ae703294188387874dcaca Component: engine
This commit is contained in:
@ -191,6 +191,16 @@ func TestRestartPolicyAlways(t *testing.T) {
|
||||
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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user