fixup! refactor(container): restart handling
This commit is contained in:
parent
f8582ffa12
commit
f776a2fe16
@ -3,7 +3,6 @@ package container_test
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"io"
|
"io"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@ -190,7 +189,6 @@ func TestClientRunContainerWithRestart(t *testing.T) {
|
|||||||
ContainerConfig: &dockercontainer.Config{Image: "alpine"},
|
ContainerConfig: &dockercontainer.Config{Image: "alpine"},
|
||||||
HostConfig: &dockercontainer.HostConfig{},
|
HostConfig: &dockercontainer.HostConfig{},
|
||||||
ShouldRestart: func(_ int64, restartCount int, _ time.Duration) (bool, error) {
|
ShouldRestart: func(_ int64, restartCount int, _ time.Duration) (bool, error) {
|
||||||
fmt.Println("ShouldRestart", restartCount)
|
|
||||||
if restartCount == 0 {
|
if restartCount == 0 {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user