Merge pull request #11436 from sunyuan3/m1
verify MaximumRetryCount for container restart policy Upstream-commit: aba193499e06341428b15f99149c00682507bbb2 Component: engine
This commit is contained in:
@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user