verify MaximumRetryCount for container restart policy

Signed-off-by: s00318865 <sunyuan3@huawei.com>
Upstream-commit: 173642c8660adb39619ecfe725bd44b984d4c627
Component: engine
This commit is contained in:
s00318865
2015-03-17 13:19:59 +08:00
parent 5f00f97ea0
commit 3f595d22d6

View File

@ -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")
}