goimports -w \
-- "./integration-cli/daemon" "./pkg/discovery" "./pkg/discovery/file" "./pkg/discovery/kv" "./pkg/discovery/memory" "./pkg/discovery/nodes" "./integration-cli" \
&& \
gofmt -w -s \
-- "./integration-cli/daemon" "./pkg/discovery" "./pkg/discovery/file" "./pkg/discovery/kv" "./pkg/discovery/memory" "./pkg/discovery/nodes" "./integration-cli"
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 59e55dcdd063d3131ed1992254350b7014d1bf1f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
... | ... |
@@ -10,13 +10,13 @@ import ( |
10 | 10 |
"net/http" |
11 | 11 |
"net/http/httputil" |
12 | 12 |
"strings" |
13 |
+ "testing" |
|
13 | 14 |
"time" |
14 | 15 |
|
15 | 16 |
"github.com/docker/docker/api/types" |
16 | 17 |
"github.com/docker/docker/client" |
17 | 18 |
"github.com/docker/docker/internal/test/request" |
18 | 19 |
"github.com/docker/docker/pkg/stdcopy" |
19 |
- "github.com/go-check/check" |
|
20 | 20 |
"github.com/pkg/errors" |
21 | 21 |
"golang.org/x/net/websocket" |
22 | 22 |
"gotest.tools/assert" |
... | ... |
@@ -11,13 +11,13 @@ import ( |
11 | 11 |
"net/http" |
12 | 12 |
"regexp" |
13 | 13 |
"strings" |
14 |
+ "testing" |
|
14 | 15 |
|
15 | 16 |
"github.com/docker/docker/api/types" |
16 | 17 |
"github.com/docker/docker/internal/test/fakecontext" |
17 | 18 |
"github.com/docker/docker/internal/test/fakegit" |
18 | 19 |
"github.com/docker/docker/internal/test/fakestorage" |
19 | 20 |
"github.com/docker/docker/internal/test/request" |
20 |
- "github.com/go-check/check" |
|
21 | 21 |
"gotest.tools/assert" |
22 | 22 |
is "gotest.tools/assert/cmp" |
23 | 23 |
) |
... | ... |
@@ -4,10 +4,10 @@ package main |
4 | 4 |
|
5 | 5 |
import ( |
6 | 6 |
"net/http" |
7 |
+ "testing" |
|
7 | 8 |
|
8 | 9 |
"github.com/docker/docker/internal/test/fakecontext" |
9 | 10 |
"github.com/docker/docker/internal/test/request" |
10 |
- "github.com/go-check/check" |
|
11 | 11 |
"gotest.tools/assert" |
12 | 12 |
is "gotest.tools/assert/cmp" |
13 | 13 |
) |
... | ... |
@@ -8,12 +8,12 @@ import ( |
8 | 8 |
"io/ioutil" |
9 | 9 |
"math/rand" |
10 | 10 |
"strings" |
11 |
+ "testing" |
|
11 | 12 |
|
12 | 13 |
winio "github.com/Microsoft/go-winio" |
13 | 14 |
"github.com/docker/docker/api/types" |
14 | 15 |
"github.com/docker/docker/api/types/container" |
15 | 16 |
"github.com/docker/docker/api/types/mount" |
16 |
- "github.com/go-check/check" |
|
17 | 17 |
"gotest.tools/assert" |
18 | 18 |
is "gotest.tools/assert/cmp" |
19 | 19 |
) |
... | ... |
@@ -7,6 +7,7 @@ import ( |
7 | 7 |
"runtime" |
8 | 8 |
"strconv" |
9 | 9 |
"strings" |
10 |
+ "testing" |
|
10 | 11 |
|
11 | 12 |
"github.com/docker/docker/api/types" |
12 | 13 |
"github.com/docker/docker/api/types/filters" |
... | ... |
@@ -15,7 +16,6 @@ import ( |
15 | 15 |
"github.com/docker/docker/integration-cli/cli/build" |
16 | 16 |
"github.com/docker/docker/internal/test/request" |
17 | 17 |
"github.com/docker/docker/pkg/parsers/kernel" |
18 |
- "github.com/go-check/check" |
|
19 | 18 |
"gotest.tools/assert" |
20 | 19 |
) |
21 | 20 |
|
... | ... |
@@ -4,11 +4,11 @@ import ( |
4 | 4 |
"context" |
5 | 5 |
"encoding/json" |
6 | 6 |
"strings" |
7 |
+ "testing" |
|
7 | 8 |
|
8 | 9 |
"github.com/docker/docker/api/types" |
9 | 10 |
"github.com/docker/docker/api/types/versions/v1p20" |
10 | 11 |
"github.com/docker/docker/client" |
11 |
- "github.com/go-check/check" |
|
12 | 12 |
"gotest.tools/assert" |
13 | 13 |
is "gotest.tools/assert/cmp" |
14 | 14 |
) |
... | ... |
@@ -10,13 +10,13 @@ import ( |
10 | 10 |
"net/http" |
11 | 11 |
"strconv" |
12 | 12 |
"strings" |
13 |
+ "testing" |
|
13 | 14 |
"time" |
14 | 15 |
|
15 | 16 |
"github.com/docker/docker/api/types" |
16 | 17 |
"github.com/docker/docker/client" |
17 | 18 |
"github.com/docker/docker/internal/test/request" |
18 | 19 |
"github.com/docker/docker/pkg/stdcopy" |
19 |
- "github.com/go-check/check" |
|
20 | 20 |
"gotest.tools/assert" |
21 | 21 |
) |
22 | 22 |
|
... | ... |
@@ -7,13 +7,13 @@ import ( |
7 | 7 |
"net/http" |
8 | 8 |
"net/url" |
9 | 9 |
"strings" |
10 |
+ "testing" |
|
10 | 11 |
|
11 | 12 |
"github.com/docker/docker/api/types" |
12 | 13 |
"github.com/docker/docker/api/types/filters" |
13 | 14 |
"github.com/docker/docker/api/types/network" |
14 | 15 |
"github.com/docker/docker/api/types/versions" |
15 | 16 |
"github.com/docker/docker/internal/test/request" |
16 |
- "github.com/go-check/check" |
|
17 | 17 |
"gotest.tools/assert" |
18 | 18 |
) |
19 | 19 |
|
... | ... |
@@ -10,13 +10,13 @@ import ( |
10 | 10 |
"strconv" |
11 | 11 |
"strings" |
12 | 12 |
"sync" |
13 |
+ "testing" |
|
13 | 14 |
"time" |
14 | 15 |
|
15 | 16 |
"github.com/docker/docker/api/types" |
16 | 17 |
"github.com/docker/docker/api/types/versions" |
17 | 18 |
"github.com/docker/docker/client" |
18 | 19 |
"github.com/docker/docker/internal/test/request" |
19 |
- "github.com/go-check/check" |
|
20 | 20 |
"gotest.tools/assert" |
21 | 21 |
) |
22 | 22 |
|
... | ... |
@@ -3,12 +3,14 @@ |
3 | 3 |
package main |
4 | 4 |
|
5 | 5 |
import ( |
6 |
+ "testing" |
|
6 | 7 |
"time" |
7 | 8 |
|
8 | 9 |
"github.com/docker/docker/api/types/swarm" |
9 | 10 |
"github.com/docker/docker/integration-cli/checker" |
10 | 11 |
"github.com/docker/docker/integration-cli/daemon" |
11 | 12 |
"github.com/go-check/check" |
13 |
+ "gotest.tools/assert" |
|
12 | 14 |
) |
13 | 15 |
|
14 | 16 |
func (s *DockerSwarmSuite) TestAPISwarmListNodes(c *testing.T) { |
... | ... |
@@ -7,11 +7,11 @@ import ( |
7 | 7 |
"runtime" |
8 | 8 |
"strconv" |
9 | 9 |
"strings" |
10 |
+ "testing" |
|
10 | 11 |
|
11 | 12 |
"github.com/docker/docker/api" |
12 | 13 |
"github.com/docker/docker/api/types/versions" |
13 | 14 |
"github.com/docker/docker/internal/test/request" |
14 |
- "github.com/go-check/check" |
|
15 | 15 |
"gotest.tools/assert" |
16 | 16 |
) |
17 | 17 |
|
... | ... |
@@ -13,9 +13,9 @@ import ( |
13 | 13 |
"regexp" |
14 | 14 |
"strings" |
15 | 15 |
"syscall" |
16 |
+ "testing" |
|
16 | 17 |
"time" |
17 | 18 |
|
18 |
- "github.com/docker/docker/integration-cli/checker" |
|
19 | 19 |
"github.com/docker/docker/integration-cli/cli" |
20 | 20 |
"github.com/docker/docker/integration-cli/cli/build" |
21 | 21 |
"github.com/docker/docker/internal/test/fakecontext" |
... | ... |
@@ -2,11 +2,13 @@ package main |
2 | 2 |
|
3 | 3 |
import ( |
4 | 4 |
"strings" |
5 |
+ "testing" |
|
5 | 6 |
|
6 | 7 |
"github.com/docker/docker/api/types/versions" |
7 | 8 |
"github.com/docker/docker/integration-cli/checker" |
8 | 9 |
"github.com/docker/docker/integration-cli/cli" |
9 | 10 |
"github.com/go-check/check" |
11 |
+ "gotest.tools/assert" |
|
10 | 12 |
) |
11 | 13 |
|
12 | 14 |
func (s *DockerSuite) TestCommitAfterContainerIsDone(c *testing.T) { |
... | ... |
@@ -11,6 +11,7 @@ import ( |
11 | 11 |
"os/exec" |
12 | 12 |
"strconv" |
13 | 13 |
"strings" |
14 |
+ "testing" |
|
14 | 15 |
"time" |
15 | 16 |
|
16 | 17 |
"github.com/docker/docker/api/types" |
... | ... |
@@ -19,7 +20,6 @@ import ( |
19 | 19 |
eventstestutils "github.com/docker/docker/daemon/events/testutils" |
20 | 20 |
"github.com/docker/docker/integration-cli/cli" |
21 | 21 |
"github.com/docker/docker/integration-cli/cli/build" |
22 |
- "github.com/go-check/check" |
|
23 | 22 |
"gotest.tools/assert" |
24 | 23 |
is "gotest.tools/assert/cmp" |
25 | 24 |
"gotest.tools/icmd" |
... | ... |
@@ -10,12 +10,12 @@ import ( |
10 | 10 |
"os" |
11 | 11 |
"os/exec" |
12 | 12 |
"strings" |
13 |
+ "testing" |
|
13 | 14 |
"time" |
14 | 15 |
"unicode" |
15 | 16 |
|
16 | 17 |
"github.com/creack/pty" |
17 | 18 |
"github.com/docker/docker/integration-cli/cli/build" |
18 |
- "github.com/go-check/check" |
|
19 | 19 |
"golang.org/x/sys/unix" |
20 | 20 |
"gotest.tools/assert" |
21 | 21 |
) |
... | ... |
@@ -11,12 +11,12 @@ import ( |
11 | 11 |
"sort" |
12 | 12 |
"strings" |
13 | 13 |
"sync" |
14 |
+ "testing" |
|
14 | 15 |
"time" |
15 | 16 |
|
16 | 17 |
"github.com/docker/docker/client" |
17 | 18 |
"github.com/docker/docker/integration-cli/cli" |
18 | 19 |
"github.com/docker/docker/integration-cli/cli/build" |
19 |
- "github.com/go-check/check" |
|
20 | 20 |
"gotest.tools/assert" |
21 | 21 |
is "gotest.tools/assert/cmp" |
22 | 22 |
"gotest.tools/icmd" |
... | ... |
@@ -4,12 +4,12 @@ import ( |
4 | 4 |
"encoding/json" |
5 | 5 |
"strconv" |
6 | 6 |
"strings" |
7 |
+ "testing" |
|
7 | 8 |
"time" |
8 | 9 |
|
9 | 10 |
"github.com/docker/docker/api/types" |
10 |
- "github.com/docker/docker/integration-cli/checker" |
|
11 | 11 |
"github.com/docker/docker/integration-cli/cli/build" |
12 |
- "github.com/go-check/check" |
|
12 |
+ "gotest.tools/assert" |
|
13 | 13 |
) |
14 | 14 |
|
15 | 15 |
func waitForHealthStatus(c *testing.T, name string, prev string, expected string) { |
... | ... |
@@ -5,10 +5,12 @@ import ( |
5 | 5 |
"regexp" |
6 | 6 |
"strconv" |
7 | 7 |
"strings" |
8 |
+ "testing" |
|
8 | 9 |
|
9 | 10 |
"github.com/docker/docker/integration-cli/checker" |
10 | 11 |
"github.com/docker/docker/integration-cli/cli/build" |
11 | 12 |
"github.com/go-check/check" |
13 |
+ "gotest.tools/assert" |
|
12 | 14 |
) |
13 | 15 |
|
14 | 16 |
// This is a heisen-test. Because the created timestamp of images and the behavior of |
... | ... |
@@ -6,11 +6,11 @@ import ( |
6 | 6 |
"os/exec" |
7 | 7 |
"regexp" |
8 | 8 |
"strings" |
9 |
+ "testing" |
|
9 | 10 |
"time" |
10 | 11 |
|
11 | 12 |
"github.com/docker/docker/integration-cli/cli" |
12 | 13 |
"github.com/docker/docker/pkg/jsonmessage" |
13 |
- "github.com/go-check/check" |
|
14 | 14 |
"gotest.tools/assert" |
15 | 15 |
"gotest.tools/icmd" |
16 | 16 |
) |
... | ... |
@@ -2,10 +2,12 @@ package main |
2 | 2 |
|
3 | 3 |
import ( |
4 | 4 |
"strings" |
5 |
+ "testing" |
|
5 | 6 |
|
6 | 7 |
"github.com/docker/docker/integration-cli/checker" |
7 | 8 |
"github.com/docker/docker/runconfig" |
8 | 9 |
"github.com/go-check/check" |
10 |
+ "gotest.tools/assert" |
|
9 | 11 |
) |
10 | 12 |
|
11 | 13 |
// GH14530. Validates combinations of --net= with other options |
... | ... |
@@ -8,6 +8,7 @@ import ( |
8 | 8 |
"fmt" |
9 | 9 |
"os/exec" |
10 | 10 |
"strings" |
11 |
+ "testing" |
|
11 | 12 |
"time" |
12 | 13 |
|
13 | 14 |
"github.com/creack/pty" |
... | ... |
@@ -15,7 +16,6 @@ import ( |
15 | 15 |
"github.com/docker/docker/client" |
16 | 16 |
"github.com/docker/docker/internal/test/request" |
17 | 17 |
"github.com/docker/docker/pkg/parsers/kernel" |
18 |
- "github.com/go-check/check" |
|
19 | 18 |
"gotest.tools/assert" |
20 | 19 |
) |
21 | 20 |
|
... | ... |
@@ -6,10 +6,10 @@ package main |
6 | 6 |
import ( |
7 | 7 |
"net/http" |
8 | 8 |
"strings" |
9 |
+ "testing" |
|
9 | 10 |
|
10 | 11 |
"github.com/docker/docker/api/types/versions" |
11 | 12 |
"github.com/docker/docker/internal/test/request" |
12 |
- "github.com/go-check/check" |
|
13 | 13 |
"gotest.tools/assert" |
14 | 14 |
is "gotest.tools/assert/cmp" |
15 | 15 |
) |
... | ... |
@@ -4,18 +4,19 @@ import ( |
4 | 4 |
"os/exec" |
5 | 5 |
"runtime" |
6 | 6 |
"strings" |
7 |
+ "testing" |
|
7 | 8 |
|
8 |
- "github.com/docker/docker/integration-cli/checker" |
|
9 | 9 |
"github.com/docker/docker/integration-cli/daemon" |
10 | 10 |
testdaemon "github.com/docker/docker/internal/test/daemon" |
11 | 11 |
"github.com/go-check/check" |
12 |
+ "gotest.tools/assert" |
|
12 | 13 |
) |
13 | 14 |
|
14 | 15 |
func init() { |
15 | 16 |
// FIXME. Temporarily turning this off for Windows as GH16039 was breaking |
16 | 17 |
// Windows to Linux CI @icecrime |
17 | 18 |
if runtime.GOOS != "windows" { |
18 |
- /*check.Suite(newDockerHubPullSuite())*/ |
|
19 |
+ /*check.Suite(newDockerHubPullSuite())*/ |
|
19 | 20 |
} |
20 | 21 |
} |
21 | 22 |
|
... | ... |
@@ -3,7 +3,8 @@ package discovery // import "github.com/docker/docker/pkg/discovery" |
3 | 3 |
import ( |
4 | 4 |
"testing" |
5 | 5 |
|
6 |
- "github.com/go-check/check" |
|
6 |
+ "github.com/docker/docker/integration-cli/checker" |
|
7 |
+ "gotest.tools/assert" |
|
7 | 8 |
) |
8 | 9 |
|
9 | 10 |
// Hook up gocheck into the "go test" runner. |
... | ... |
@@ -11,7 +12,7 @@ func Test(t *testing.T) { /*check.TestingT(t)*/ } |
11 | 11 |
|
12 | 12 |
type DiscoverySuite struct{} |
13 | 13 |
|
14 |
- /*check.Suite(&DiscoverySuite{})*/ |
|
14 |
+/*check.Suite(&DiscoverySuite{})*/ |
|
15 | 15 |
|
16 | 16 |
func (s *DiscoverySuite) TestNewEntry(c *testing.T) { |
17 | 17 |
entry, err := NewEntry("127.0.0.1:2375") |
... | ... |
@@ -6,8 +6,7 @@ import ( |
6 | 6 |
"testing" |
7 | 7 |
|
8 | 8 |
"github.com/docker/docker/pkg/discovery" |
9 |
- |
|
10 |
- "github.com/go-check/check" |
|
9 |
+ "gotest.tools/assert" |
|
11 | 10 |
) |
12 | 11 |
|
13 | 12 |
// Hook up gocheck into the "go test" runner. |
... | ... |
@@ -15,7 +14,7 @@ func Test(t *testing.T) { /*check.TestingT(t)*/ } |
15 | 15 |
|
16 | 16 |
type DiscoverySuite struct{} |
17 | 17 |
|
18 |
- /*check.Suite(&DiscoverySuite{})*/ |
|
18 |
+/*check.Suite(&DiscoverySuite{})*/ |
|
19 | 19 |
|
20 | 20 |
func (s *DiscoverySuite) TestInitialize(c *testing.T) { |
21 | 21 |
d := &Discovery{} |
... | ... |
@@ -11,7 +11,7 @@ import ( |
11 | 11 |
"github.com/docker/docker/pkg/discovery" |
12 | 12 |
"github.com/docker/libkv" |
13 | 13 |
"github.com/docker/libkv/store" |
14 |
- "github.com/go-check/check" |
|
14 |
+ "gotest.tools/assert" |
|
15 | 15 |
) |
16 | 16 |
|
17 | 17 |
// Hook up gocheck into the "go test" runner. |
... | ... |
@@ -19,7 +19,7 @@ func Test(t *testing.T) { /*check.TestingT(t)*/ } |
19 | 19 |
|
20 | 20 |
type DiscoverySuite struct{} |
21 | 21 |
|
22 |
- /*check.Suite(&DiscoverySuite{})*/ |
|
22 |
+/*check.Suite(&DiscoverySuite{})*/ |
|
23 | 23 |
|
24 | 24 |
func (ds *DiscoverySuite) TestInitialize(c *testing.T) { |
25 | 25 |
storeMock := &FakeStore{ |
... | ... |
@@ -4,7 +4,7 @@ import ( |
4 | 4 |
"testing" |
5 | 5 |
|
6 | 6 |
"github.com/docker/docker/pkg/discovery" |
7 |
- "github.com/go-check/check" |
|
7 |
+ "gotest.tools/assert" |
|
8 | 8 |
) |
9 | 9 |
|
10 | 10 |
// Hook up gocheck into the "go test" runner. |
... | ... |
@@ -12,7 +12,7 @@ func Test(t *testing.T) { /*check.TestingT(t)*/ } |
12 | 12 |
|
13 | 13 |
type discoverySuite struct{} |
14 | 14 |
|
15 |
- /*check.Suite(&discoverySuite{})*/ |
|
15 |
+/*check.Suite(&discoverySuite{})*/ |
|
16 | 16 |
|
17 | 17 |
func (s *discoverySuite) TestWatch(c *testing.T) { |
18 | 18 |
d := &Discovery{} |
... | ... |
@@ -4,8 +4,7 @@ import ( |
4 | 4 |
"testing" |
5 | 5 |
|
6 | 6 |
"github.com/docker/docker/pkg/discovery" |
7 |
- |
|
8 |
- "github.com/go-check/check" |
|
7 |
+ "gotest.tools/assert" |
|
9 | 8 |
) |
10 | 9 |
|
11 | 10 |
// Hook up gocheck into the "go test" runner. |
... | ... |
@@ -13,7 +12,7 @@ func Test(t *testing.T) { /*check.TestingT(t)*/ } |
13 | 13 |
|
14 | 14 |
type DiscoverySuite struct{} |
15 | 15 |
|
16 |
- /*check.Suite(&DiscoverySuite{})*/ |
|
16 |
+/*check.Suite(&DiscoverySuite{})*/ |
|
17 | 17 |
|
18 | 18 |
func (s *DiscoverySuite) TestInitialize(c *testing.T) { |
19 | 19 |
d := &Discovery{} |