diff --git a/pkg/compose/create.go b/pkg/compose/create.go index f430c5be8f7..c0a36a8a0aa 100644 --- a/pkg/compose/create.go +++ b/pkg/compose/create.go @@ -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) } } diff --git a/pkg/compose/logs_test.go b/pkg/compose/logs_test.go index a8155182706..9a96e34deef 100644 --- a/pkg/compose/logs_test.go +++ b/pkg/compose/logs_test.go @@ -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 }