…ontainers
noRestart() returned a policy with an empty Name (""), which the Docker Engine
update endpoint ignores: it only applies RestartPolicy when Name != "". As a
result an existing container could not be switched from always/on-failure back
to no-restart via updateContainerCmd.
Return Name "no" instead - a valid "none" policy (RestartPolicy.IsNone() is true
for both "" and "no") that the daemon actually applies. Update
RestartPolicySerializingTest to match; this also matches what modern Docker sends
for `docker run --restart no`.
noRestart() returned a policy with an empty Name (""), which the Docker Engine update endpoint ignores: it only applies RestartPolicy when Name != "". As a result an existing container could not be switched from always/on-failure back to no-restart via updateContainerCmd.
Return Name "no" instead - a valid "none" policy (RestartPolicy.IsNone() is true for both "" and "no") that the daemon actually applies. Update RestartPolicySerializingTest to match; this also matches what modern Docker sends for docker run --restart no.