mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
adopt container.RestartPolicy*
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
df1533a1ca
commit
8026d0e2f2
@ -449,15 +449,15 @@ func mapRestartPolicyCondition(condition string) container.RestartPolicyMode {
|
||||
// map definitions of deploy.restart_policy to engine definitions
|
||||
switch condition {
|
||||
case "none", "no":
|
||||
return types.RestartPolicyNo
|
||||
return container.RestartPolicyDisabled
|
||||
case "on-failure":
|
||||
return types.RestartPolicyOnFailure
|
||||
return container.RestartPolicyOnFailure
|
||||
case "unless-stopped":
|
||||
return types.RestartPolicyUnlessStopped
|
||||
return container.RestartPolicyUnlessStopped
|
||||
case "any", "always":
|
||||
return types.RestartPolicyAlways
|
||||
return container.RestartPolicyAlways
|
||||
default:
|
||||
return types.RestartPolicyNo
|
||||
return container.RestartPolicyMode(condition)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ func TestComposeService_Logs_ServiceFiltering(t *testing.T) {
|
||||
|
||||
type testLogConsumer struct {
|
||||
mu sync.Mutex
|
||||
// logs is keyed containerType; values are log lines
|
||||
// logs is keyed by container ID; values are log lines
|
||||
logs map[string][]string
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user