1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Update tests to use gotest.tools 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2018-06-11 15:32:11 +02:00
parent c147e9e1a4
commit 3845728524
262 changed files with 517 additions and 518 deletions

View File

@ -8,11 +8,11 @@ questions you may have as an aspiring Moby contributor.
Moby has two test suites (and one legacy test suite): Moby has two test suites (and one legacy test suite):
* Unit tests - use standard `go test` and * Unit tests - use standard `go test` and
[gotestyourself/assert](https://godoc.org/github.com/gotestyourself/gotestyourself/assert) assertions. They are located in [gotest.tools/assert](https://godoc.org/gotest.tools/assert) assertions. They are located in
the package they test. Unit tests should be fast and test only their own the package they test. Unit tests should be fast and test only their own
package. package.
* API integration tests - use standard `go test` and * API integration tests - use standard `go test` and
[gotestyourself/assert](https://godoc.org/github.com/gotestyourself/gotestyourself/assert) assertions. They are located in [gotest.tools/assert](https://godoc.org/gotest.tools/assert) assertions. They are located in
`./integration/<component>` directories, where `component` is: container, `./integration/<component>` directories, where `component` is: container,
image, volume, etc. These tests perform HTTP requests to an API endpoint and image, volume, etc. These tests perform HTTP requests to an API endpoint and
check the HTTP response and daemon state after the call. check the HTTP response and daemon state after the call.

View File

@ -3,8 +3,8 @@ package middleware // import "github.com/docker/docker/api/server/middleware"
import ( import (
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestMaskSecretKeys(t *testing.T) { func TestMaskSecretKeys(t *testing.T) {

View File

@ -8,8 +8,8 @@ import (
"testing" "testing"
"github.com/docker/docker/api/server/httputils" "github.com/docker/docker/api/server/httputils"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestVersionMiddlewareVersion(t *testing.T) { func TestVersionMiddlewareVersion(t *testing.T) {

View File

@ -4,8 +4,8 @@ import (
"errors" "errors"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestParseArgs(t *testing.T) { func TestParseArgs(t *testing.T) {

View File

@ -5,8 +5,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func strPtr(source string) *string { func strPtr(source string) *string {

View File

@ -5,9 +5,9 @@ import (
"testing" "testing"
"github.com/docker/docker/pkg/containerfs" "github.com/docker/docker/pkg/containerfs"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
"github.com/gotestyourself/gotestyourself/fs" "gotest.tools/fs"
) )
func TestIsExistingDirectory(t *testing.T) { func TestIsExistingDirectory(t *testing.T) {

View File

@ -14,10 +14,10 @@ import (
"github.com/docker/docker/image" "github.com/docker/docker/image"
"github.com/docker/docker/pkg/system" "github.com/docker/docker/pkg/system"
"github.com/docker/go-connections/nat" "github.com/docker/go-connections/nat"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/moby/buildkit/frontend/dockerfile/instructions" "github.com/moby/buildkit/frontend/dockerfile/instructions"
"github.com/moby/buildkit/frontend/dockerfile/shell" "github.com/moby/buildkit/frontend/dockerfile/shell"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func newBuilderWithMockBackend() *Builder { func newBuilderWithMockBackend() *Builder {

View File

@ -7,10 +7,10 @@ import (
"github.com/docker/docker/builder/remotecontext" "github.com/docker/docker/builder/remotecontext"
"github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/reexec" "github.com/docker/docker/pkg/reexec"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/skip"
"github.com/moby/buildkit/frontend/dockerfile/instructions" "github.com/moby/buildkit/frontend/dockerfile/instructions"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/skip"
) )
type dispatchTestCase struct { type dispatchTestCase struct {
@ -97,7 +97,7 @@ func initDispatchTestCases() []dispatchTestCase {
} }
func TestDispatch(t *testing.T) { func TestDispatch(t *testing.T) {
skip.IfCondition(t, os.Getuid() != 0, "skipping test that requires root") skip.If(t, os.Getuid() != 0, "skipping test that requires root")
testCases := initDispatchTestCases() testCases := initDispatchTestCases()
for _, testCase := range testCases { for _, testCase := range testCases {

View File

@ -6,8 +6,8 @@ import (
"testing" "testing"
"github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/idtools"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestChownFlagParsing(t *testing.T) { func TestChownFlagParsing(t *testing.T) {

View File

@ -13,9 +13,9 @@ import (
"github.com/docker/docker/builder/remotecontext" "github.com/docker/docker/builder/remotecontext"
"github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/archive"
"github.com/docker/go-connections/nat" "github.com/docker/go-connections/nat"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
"github.com/gotestyourself/gotestyourself/skip" "gotest.tools/skip"
) )
func TestEmptyDockerfile(t *testing.T) { func TestEmptyDockerfile(t *testing.T) {
@ -61,7 +61,7 @@ func TestNonExistingDockerfile(t *testing.T) {
} }
func readAndCheckDockerfile(t *testing.T, testName, contextDir, dockerfilePath, expectedError string) { func readAndCheckDockerfile(t *testing.T, testName, contextDir, dockerfilePath, expectedError string) {
skip.IfCondition(t, os.Getuid() != 0, "skipping test that requires root") skip.If(t, os.Getuid() != 0, "skipping test that requires root")
tarStream, err := archive.Tar(contextDir, archive.Uncompressed) tarStream, err := archive.Tar(contextDir, archive.Uncompressed)
assert.NilError(t, err) assert.NilError(t, err)

View File

@ -6,8 +6,8 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestNormalizeDest(t *testing.T) { func TestNormalizeDest(t *testing.T) {

View File

@ -8,9 +8,9 @@ import (
"testing" "testing"
"time" "time"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/moby/buildkit/session/filesync" "github.com/moby/buildkit/session/filesync"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func TestFSCache(t *testing.T) { func TestFSCache(t *testing.T) {

View File

@ -14,8 +14,8 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestParseRemoteURL(t *testing.T) { func TestParseRemoteURL(t *testing.T) {

View File

@ -3,8 +3,8 @@ package remotecontext // import "github.com/docker/docker/builder/remotecontext"
import ( import (
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestDetectContentType(t *testing.T) { func TestDetectContentType(t *testing.T) {

View File

@ -10,9 +10,9 @@ import (
"testing" "testing"
"github.com/docker/docker/builder" "github.com/docker/docker/builder"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
"github.com/gotestyourself/gotestyourself/fs" "gotest.tools/fs"
) )
var binaryContext = []byte{0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00} //xz magic var binaryContext = []byte{0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00} //xz magic

View File

@ -9,8 +9,8 @@ import (
"github.com/docker/docker/builder" "github.com/docker/docker/builder"
"github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/reexec" "github.com/docker/docker/pkg/reexec"
"github.com/gotestyourself/gotestyourself/skip"
"github.com/pkg/errors" "github.com/pkg/errors"
"gotest.tools/skip"
) )
const ( const (
@ -137,7 +137,7 @@ func TestRemoveDirectory(t *testing.T) {
} }
func makeTestArchiveContext(t *testing.T, dir string) builder.Source { func makeTestArchiveContext(t *testing.T, dir string) builder.Source {
skip.IfCondition(t, os.Getuid() != 0, "skipping test that requires root") skip.If(t, os.Getuid() != 0, "skipping test that requires root")
tarStream, err := archive.Tar(dir, archive.Uncompressed) tarStream, err := archive.Tar(dir, archive.Uncompressed)
if err != nil { if err != nil {
t.Fatalf("error: %s", err) t.Fatalf("error: %s", err)

View File

@ -10,10 +10,10 @@ import (
"github.com/docker/docker/api" "github.com/docker/docker/api"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
"github.com/gotestyourself/gotestyourself/env" "gotest.tools/env"
"github.com/gotestyourself/gotestyourself/skip" "gotest.tools/skip"
) )
func TestNewEnvClient(t *testing.T) { func TestNewEnvClient(t *testing.T) {

View File

@ -12,8 +12,8 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestConfigCreateUnsupported(t *testing.T) { func TestConfigCreateUnsupported(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing" "testing"
"github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors" "github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func TestConfigInspectNotFound(t *testing.T) { func TestConfigInspectNotFound(t *testing.T) {

View File

@ -13,8 +13,8 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestConfigListUnsupported(t *testing.T) { func TestConfigListUnsupported(t *testing.T) {

View File

@ -9,8 +9,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestConfigRemoveUnsupported(t *testing.T) { func TestConfigRemoveUnsupported(t *testing.T) {

View File

@ -10,8 +10,8 @@ import (
"testing" "testing"
"github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestConfigUpdateUnsupported(t *testing.T) { func TestConfigUpdateUnsupported(t *testing.T) {

View File

@ -14,8 +14,8 @@ import (
"time" "time"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestContainerLogsNotFoundError(t *testing.T) { func TestContainerLogsNotFoundError(t *testing.T) {

View File

@ -12,8 +12,8 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/filters"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestContainersPruneError(t *testing.T) { func TestContainersPruneError(t *testing.T) {

View File

@ -10,8 +10,8 @@ import (
"testing" "testing"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestContainerRemoveError(t *testing.T) { func TestContainerRemoveError(t *testing.T) {

View File

@ -5,9 +5,9 @@ import (
"net/http" "net/http"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors" "github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func TestDistributionInspectUnsupported(t *testing.T) { func TestDistributionInspectUnsupported(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"github.com/docker/docker/api/server/httputils" "github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/pkg/errors" "github.com/pkg/errors"
"golang.org/x/net/context" "golang.org/x/net/context"
"gotest.tools/assert"
) )
func TestTLSCloseWriter(t *testing.T) { func TestTLSCloseWriter(t *testing.T) {

View File

@ -12,8 +12,8 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/filters"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestImagesPruneError(t *testing.T) { func TestImagesPruneError(t *testing.T) {

View File

@ -11,8 +11,8 @@ import (
"testing" "testing"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestImageRemoveError(t *testing.T) { func TestImageRemoveError(t *testing.T) {

View File

@ -12,9 +12,9 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/network"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors" "github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func TestNetworkInspectError(t *testing.T) { func TestNetworkInspectError(t *testing.T) {

View File

@ -12,8 +12,8 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/filters"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestNetworksPruneError(t *testing.T) { func TestNetworksPruneError(t *testing.T) {

View File

@ -8,8 +8,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
// TestPingFail tests that when a server sends a non-successful response that we // TestPingFail tests that when a server sends a non-successful response that we

View File

@ -10,7 +10,7 @@ import (
"testing" "testing"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
) )
// TestSetHostHeader should set fake host for local communications, set real host // TestSetHostHeader should set fake host for local communications, set real host

View File

@ -12,8 +12,8 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestSecretCreateUnsupported(t *testing.T) { func TestSecretCreateUnsupported(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing" "testing"
"github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors" "github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func TestSecretInspectUnsupported(t *testing.T) { func TestSecretInspectUnsupported(t *testing.T) {

View File

@ -13,8 +13,8 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestSecretListUnsupported(t *testing.T) { func TestSecretListUnsupported(t *testing.T) {

View File

@ -9,8 +9,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestSecretRemoveUnsupported(t *testing.T) { func TestSecretRemoveUnsupported(t *testing.T) {

View File

@ -10,8 +10,8 @@ import (
"testing" "testing"
"github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestSecretUpdateUnsupported(t *testing.T) { func TestSecretUpdateUnsupported(t *testing.T) {

View File

@ -13,10 +13,10 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
registrytypes "github.com/docker/docker/api/types/registry" registrytypes "github.com/docker/docker/api/types/registry"
"github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/opencontainers/go-digest" "github.com/opencontainers/go-digest"
"github.com/opencontainers/image-spec/specs-go/v1" "github.com/opencontainers/image-spec/specs-go/v1"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func TestServiceCreateError(t *testing.T) { func TestServiceCreateError(t *testing.T) {

View File

@ -14,8 +14,8 @@ import (
"time" "time"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestServiceLogsError(t *testing.T) { func TestServiceLogsError(t *testing.T) {

View File

@ -9,8 +9,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestServiceRemoveError(t *testing.T) { func TestServiceRemoveError(t *testing.T) {

View File

@ -11,8 +11,8 @@ import (
"testing" "testing"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestSwarmGetUnlockKeyError(t *testing.T) { func TestSwarmGetUnlockKeyError(t *testing.T) {

View File

@ -11,9 +11,9 @@ import (
"testing" "testing"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors" "github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func TestVolumeInspectError(t *testing.T) { func TestVolumeInspectError(t *testing.T) {

View File

@ -6,9 +6,9 @@ import (
"testing" "testing"
"github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/config"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/spf13/pflag" "github.com/spf13/pflag"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func TestDaemonParseShmSize(t *testing.T) { func TestDaemonParseShmSize(t *testing.T) {

View File

@ -4,11 +4,11 @@ import (
"testing" "testing"
"github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/config"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/fs"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/spf13/pflag" "github.com/spf13/pflag"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/fs"
) )
func defaultOptions(configFile string) *daemonOptions { func defaultOptions(configFile string) *daemonOptions {

View File

@ -6,9 +6,9 @@ import (
"testing" "testing"
"github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/config"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
"github.com/gotestyourself/gotestyourself/fs" "gotest.tools/fs"
) )
func TestLoadDaemonCliConfigWithDaemonFlags(t *testing.T) { func TestLoadDaemonCliConfigWithDaemonFlags(t *testing.T) {

View File

@ -6,9 +6,9 @@ import (
cliconfig "github.com/docker/docker/cli/config" cliconfig "github.com/docker/docker/cli/config"
"github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/config"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/spf13/pflag" "github.com/spf13/pflag"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func TestCommonOptionsInstallFlags(t *testing.T) { func TestCommonOptionsInstallFlags(t *testing.T) {

View File

@ -11,7 +11,7 @@ import (
swarmtypes "github.com/docker/docker/api/types/swarm" swarmtypes "github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/daemon/logger/jsonfilelog" "github.com/docker/docker/daemon/logger/jsonfilelog"
"github.com/docker/docker/pkg/signal" "github.com/docker/docker/pkg/signal"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
) )
func TestContainerStopSignal(t *testing.T) { func TestContainerStopSignal(t *testing.T) {

View File

@ -8,9 +8,9 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
containertypes "github.com/docker/docker/api/types/container" containertypes "github.com/docker/docker/api/types/container"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pborman/uuid" "github.com/pborman/uuid"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
var root string var root string

View File

@ -8,7 +8,7 @@ import (
"github.com/docker/docker/api/types/swarm/runtime" "github.com/docker/docker/api/types/swarm/runtime"
swarmapi "github.com/docker/swarmkit/api" swarmapi "github.com/docker/swarmkit/api"
google_protobuf3 "github.com/gogo/protobuf/types" google_protobuf3 "github.com/gogo/protobuf/types"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
) )
func TestServiceConvertFromGRPCRuntimeContainer(t *testing.T) { func TestServiceConvertFromGRPCRuntimeContainer(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/container"
swarmapi "github.com/docker/swarmkit/api" swarmapi "github.com/docker/swarmkit/api"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
) )
func TestIsolationConversion(t *testing.T) { func TestIsolationConversion(t *testing.T) {

View File

@ -8,11 +8,11 @@ import (
"github.com/docker/docker/daemon/discovery" "github.com/docker/docker/daemon/discovery"
"github.com/docker/docker/opts" "github.com/docker/docker/opts"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/fs"
"github.com/gotestyourself/gotestyourself/skip"
"github.com/spf13/pflag" "github.com/spf13/pflag"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/fs"
"gotest.tools/skip"
) )
func TestDaemonConfigurationNotFound(t *testing.T) { func TestDaemonConfigurationNotFound(t *testing.T) {
@ -461,7 +461,7 @@ func TestReloadSetConfigFileNotExist(t *testing.T) {
// TestReloadDefaultConfigNotExist tests that if the default configuration file // TestReloadDefaultConfigNotExist tests that if the default configuration file
// doesn't exist the daemon still will be reloaded. // doesn't exist the daemon still will be reloaded.
func TestReloadDefaultConfigNotExist(t *testing.T) { func TestReloadDefaultConfigNotExist(t *testing.T) {
skip.IfCondition(t, os.Getuid() != 0, "skipping test that requires root") skip.If(t, os.Getuid() != 0, "skipping test that requires root")
reloaded := false reloaded := false
configFile := "/etc/docker/daemon.json" configFile := "/etc/docker/daemon.json"
flags := pflag.NewFlagSet("test", pflag.ContinueOnError) flags := pflag.NewFlagSet("test", pflag.ContinueOnError)

View File

@ -7,10 +7,10 @@ import (
"github.com/docker/docker/opts" "github.com/docker/docker/opts"
"github.com/docker/go-units" "github.com/docker/go-units"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/fs"
"github.com/spf13/pflag" "github.com/spf13/pflag"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/fs"
) )
func TestGetConflictFreeConfiguration(t *testing.T) { func TestGetConflictFreeConfiguration(t *testing.T) {

View File

@ -7,9 +7,9 @@ import (
"testing" "testing"
"github.com/docker/docker/opts" "github.com/docker/docker/opts"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/spf13/pflag" "github.com/spf13/pflag"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func TestDaemonConfigurationMerge(t *testing.T) { func TestDaemonConfigurationMerge(t *testing.T) {

View File

@ -9,7 +9,7 @@ import (
containertypes "github.com/docker/docker/api/types/container" containertypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/config"
"github.com/docker/go-connections/nat" "github.com/docker/go-connections/nat"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
) )
// TestContainerWarningHostAndPublishPorts that a warning is returned when setting network mode to host and specifying published ports. // TestContainerWarningHostAndPublishPorts that a warning is returned when setting network mode to host and specifying published ports.

View File

@ -5,7 +5,7 @@ import (
"github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/network"
"github.com/docker/docker/errdefs" "github.com/docker/docker/errdefs"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
) )
// Test case for 35752 // Test case for 35752

View File

@ -15,8 +15,8 @@ import (
"github.com/docker/docker/oci" "github.com/docker/docker/oci"
"github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/idtools"
"github.com/docker/docker/pkg/mount" "github.com/docker/docker/pkg/mount"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
const mountsFixture = `142 78 0:38 / / rw,relatime - aufs none rw,si=573b861da0b3a05b,dio const mountsFixture = `142 78 0:38 / / rw,relatime - aufs none rw,si=573b861da0b3a05b,dio

View File

@ -16,9 +16,9 @@ import (
volumesservice "github.com/docker/docker/volume/service" volumesservice "github.com/docker/docker/volume/service"
"github.com/docker/go-connections/nat" "github.com/docker/go-connections/nat"
"github.com/docker/libnetwork" "github.com/docker/libnetwork"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors" "github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
// //

View File

@ -9,8 +9,8 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
containertypes "github.com/docker/docker/api/types/container" containertypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/container" "github.com/docker/docker/container"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func newDaemonWithTmpRoot(t *testing.T) (*Daemon, func()) { func newDaemonWithTmpRoot(t *testing.T) (*Daemon, func()) {

View File

@ -5,8 +5,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestDiscoveryOptsErrors(t *testing.T) { func TestDiscoveryOptsErrors(t *testing.T) {

View File

@ -8,9 +8,9 @@ import (
containertypes "github.com/docker/docker/api/types/container" containertypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/container" "github.com/docker/docker/container"
"github.com/docker/docker/daemon/exec" "github.com/docker/docker/daemon/exec"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/opencontainers/runc/libcontainer/apparmor" "github.com/opencontainers/runc/libcontainer/apparmor"
"github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/runtime-spec/specs-go"
"gotest.tools/assert"
) )
func TestExecSetPlatformOpt(t *testing.T) { func TestExecSetPlatformOpt(t *testing.T) {

View File

@ -17,8 +17,8 @@ import (
"github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/reexec" "github.com/docker/docker/pkg/reexec"
"github.com/docker/docker/pkg/stringid" "github.com/docker/docker/pkg/stringid"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
var ( var (

View File

@ -13,9 +13,9 @@ import (
"time" "time"
"github.com/docker/docker/pkg/system" "github.com/docker/docker/pkg/system"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"golang.org/x/sys/unix" "golang.org/x/sys/unix"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func TestCopy(t *testing.T) { func TestCopy(t *testing.T) {

View File

@ -6,7 +6,7 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
) )
func TestIsEmptyDir(t *testing.T) { func TestIsEmptyDir(t *testing.T) {

View File

@ -9,7 +9,7 @@ import (
contdriver "github.com/containerd/continuity/driver" contdriver "github.com/containerd/continuity/driver"
"github.com/docker/docker/pkg/stringid" "github.com/docker/docker/pkg/stringid"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
) )
// DriverBenchExists benchmarks calls to exist // DriverBenchExists benchmarks calls to exist

View File

@ -16,9 +16,9 @@ import (
"github.com/docker/docker/daemon/graphdriver/quota" "github.com/docker/docker/daemon/graphdriver/quota"
"github.com/docker/docker/pkg/stringid" "github.com/docker/docker/pkg/stringid"
"github.com/docker/go-units" "github.com/docker/go-units"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"golang.org/x/sys/unix" "golang.org/x/sys/unix"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
var ( var (

View File

@ -9,9 +9,9 @@ import (
contdriver "github.com/containerd/continuity/driver" contdriver "github.com/containerd/continuity/driver"
"github.com/docker/docker/daemon/graphdriver" "github.com/docker/docker/daemon/graphdriver"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"golang.org/x/sys/unix" "golang.org/x/sys/unix"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func verifyFile(t testing.TB, path string, mode os.FileMode, uid, gid uint32) { func verifyFile(t testing.TB, path string, mode os.FileMode, uid, gid uint32) {

View File

@ -10,10 +10,10 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/fs"
"golang.org/x/sys/unix" "golang.org/x/sys/unix"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/fs"
) )
// 10MB // 10MB

View File

@ -7,8 +7,8 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/dockerversion" "github.com/docker/docker/dockerversion"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestParseInitVersion(t *testing.T) { func TestParseInitVersion(t *testing.T) {

View File

@ -7,8 +7,8 @@ import (
"github.com/docker/docker/container" "github.com/docker/docker/container"
"github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/config"
"github.com/docker/docker/daemon/exec" "github.com/docker/docker/daemon/exec"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestGetInspectData(t *testing.T) { func TestGetInspectData(t *testing.T) {

View File

@ -6,8 +6,8 @@ import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/filters"
"github.com/docker/docker/container" "github.com/docker/docker/container"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestListInvalidFilter(t *testing.T) { func TestListInvalidFilter(t *testing.T) {

View File

@ -9,8 +9,8 @@ import (
"github.com/docker/docker/api/types/plugins/logdriver" "github.com/docker/docker/api/types/plugins/logdriver"
protoio "github.com/gogo/protobuf/io" protoio "github.com/gogo/protobuf/io"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
// mockLoggingPlugin implements the loggingPlugin interface for testing purposes // mockLoggingPlugin implements the loggingPlugin interface for testing purposes

View File

@ -21,8 +21,8 @@ import (
"github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/logger"
"github.com/docker/docker/daemon/logger/loggerutils" "github.com/docker/docker/daemon/logger/loggerutils"
"github.com/docker/docker/dockerversion" "github.com/docker/docker/dockerversion"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
const ( const (

View File

@ -14,9 +14,9 @@ import (
"github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/logger"
"github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog" "github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
"github.com/gotestyourself/gotestyourself/fs" "gotest.tools/fs"
) )
func TestJSONFileLogger(t *testing.T) { func TestJSONFileLogger(t *testing.T) {

View File

@ -8,7 +8,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
) )
func TestJSONLogsMarshalJSONBuf(t *testing.T) { func TestJSONLogsMarshalJSONBuf(t *testing.T) {

View File

@ -4,8 +4,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestFastTimeMarshalJSONWithInvalidYear(t *testing.T) { func TestFastTimeMarshalJSONWithInvalidYear(t *testing.T) {

View File

@ -6,8 +6,8 @@ import (
"time" "time"
"github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/logger"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
"github.com/gotestyourself/gotestyourself/fs" "gotest.tools/fs"
) )
func BenchmarkJSONFileLoggerReadLogs(b *testing.B) { func BenchmarkJSONFileLoggerReadLogs(b *testing.B) {

View File

@ -11,8 +11,8 @@ import (
"time" "time"
"github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/logger"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
"github.com/gotestyourself/gotestyourself/env" "gotest.tools/env"
) )
// Validate options // Validate options

View File

@ -4,8 +4,8 @@ import (
"bytes" "bytes"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestNewParse(t *testing.T) { func TestNewParse(t *testing.T) {

View File

@ -9,8 +9,8 @@ import (
"github.com/docker/docker/daemon/config" "github.com/docker/docker/daemon/config"
"github.com/docker/docker/oci" "github.com/docker/docker/oci"
"github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/idtools"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
// TestTmpfsDevShmNoDupMount checks that a user-specified /dev/shm tmpfs // TestTmpfsDevShmNoDupMount checks that a user-specified /dev/shm tmpfs

View File

@ -13,8 +13,8 @@ import (
_ "github.com/docker/docker/pkg/discovery/memory" _ "github.com/docker/docker/pkg/discovery/memory"
"github.com/docker/docker/registry" "github.com/docker/docker/registry"
"github.com/docker/libnetwork" "github.com/docker/libnetwork"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func TestDaemonReloadLabels(t *testing.T) { func TestDaemonReloadLabels(t *testing.T) {

View File

@ -8,7 +8,7 @@ import (
"github.com/docker/docker/container" "github.com/docker/docker/container"
"github.com/docker/docker/daemon/exec" "github.com/docker/docker/daemon/exec"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
) )
// This test simply verify that when a wrong ID used, a specific error should be returned for exec resize. // This test simply verify that when a wrong ID used, a specific error should be returned for exec resize.

View File

@ -6,9 +6,9 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
"github.com/gotestyourself/gotestyourself/fs" "gotest.tools/fs"
) )
// LoadOrCreateTrustKey // LoadOrCreateTrustKey

View File

@ -6,7 +6,7 @@ import (
"testing" "testing"
"github.com/docker/docker/layer" "github.com/docker/docker/layer"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
) )
func TestV1IDService(t *testing.T) { func TestV1IDService(t *testing.T) {

View File

@ -10,9 +10,9 @@ import (
"github.com/docker/distribution/manifest/schema1" "github.com/docker/distribution/manifest/schema1"
"github.com/docker/distribution/reference" "github.com/docker/distribution/reference"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/opencontainers/go-digest" "github.com/opencontainers/go-digest"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
// TestFixManifestLayers checks that fixManifestLayers removes a duplicate // TestFixManifestLayers checks that fixManifestLayers removes a duplicate

View File

@ -10,9 +10,9 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/opencontainers/go-digest" "github.com/opencontainers/go-digest"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
) )
func defaultFSStoreBackend(t *testing.T) (StoreBackend, func()) { func defaultFSStoreBackend(t *testing.T) (StoreBackend, func()) {

View File

@ -10,8 +10,8 @@ import (
"github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/container"
"github.com/docker/docker/layer" "github.com/docker/docker/layer"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
const sampleImageJSON = `{ const sampleImageJSON = `{

View File

@ -6,9 +6,9 @@ import (
"testing" "testing"
"github.com/docker/docker/layer" "github.com/docker/docker/layer"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/opencontainers/go-digest" "github.com/opencontainers/go-digest"
"gotest.tools/assert"
"gotest.tools/assert/cmp"
) )
func TestRestore(t *testing.T) { func TestRestore(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"strings" "strings"
"github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/internal/test/fakecontext"
"github.com/gotestyourself/gotestyourself/icmd" "gotest.tools/icmd"
) )
type testingT interface { type testingT interface {

View File

@ -8,9 +8,9 @@ import (
"github.com/docker/docker/integration-cli/daemon" "github.com/docker/docker/integration-cli/daemon"
"github.com/docker/docker/integration-cli/environment" "github.com/docker/docker/integration-cli/environment"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/gotestyourself/gotestyourself/icmd"
"github.com/pkg/errors" "github.com/pkg/errors"
"gotest.tools/assert"
"gotest.tools/icmd"
) )
var testEnv *environment.Execution var testEnv *environment.Execution

View File

@ -8,9 +8,9 @@ import (
"github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/checker"
"github.com/docker/docker/internal/test/daemon" "github.com/docker/docker/internal/test/daemon"
"github.com/go-check/check" "github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/gotestyourself/gotestyourself/icmd"
"github.com/pkg/errors" "github.com/pkg/errors"
"gotest.tools/assert"
"gotest.tools/icmd"
) )
type testingT interface { type testingT interface {

View File

@ -11,7 +11,7 @@ import (
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/checker"
"github.com/go-check/check" "github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
) )
// CheckServiceTasksInState returns the number of tasks with a matching state, // CheckServiceTasksInState returns the number of tasks with a matching state,

View File

@ -19,8 +19,8 @@ import (
"github.com/docker/docker/internal/test/fakestorage" "github.com/docker/docker/internal/test/fakestorage"
"github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/test/request"
"github.com/go-check/check" "github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func (s *DockerSuite) TestBuildAPIDockerFileRemote(c *check.C) { func (s *DockerSuite) TestBuildAPIDockerFileRemote(c *check.C) {

View File

@ -9,8 +9,8 @@ import (
"github.com/docker/docker/internal/test/fakecontext" "github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/test/request"
"github.com/go-check/check" "github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func (s *DockerSuite) TestBuildWithRecycleBin(c *check.C) { func (s *DockerSuite) TestBuildWithRecycleBin(c *check.C) {

View File

@ -33,9 +33,9 @@ import (
"github.com/docker/docker/volume" "github.com/docker/docker/volume"
"github.com/docker/go-connections/nat" "github.com/docker/go-connections/nat"
"github.com/go-check/check" "github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
"github.com/gotestyourself/gotestyourself/poll" "gotest.tools/poll"
) )
func (s *DockerSuite) TestContainerAPIGetAll(c *check.C) { func (s *DockerSuite) TestContainerAPIGetAll(c *check.C) {

View File

@ -14,8 +14,8 @@ import (
"github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/mount"
"github.com/go-check/check" "github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func (s *DockerSuite) TestContainersAPICreateMountsBindNamedPipe(c *check.C) { func (s *DockerSuite) TestContainersAPICreateMountsBindNamedPipe(c *check.C) {

View File

@ -10,8 +10,8 @@ import (
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/checker"
"github.com/go-check/check" "github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
func (s *DockerSuite) TestInspectAPIContainerResponse(c *check.C) { func (s *DockerSuite) TestInspectAPIContainerResponse(c *check.C) {

View File

@ -17,8 +17,8 @@ import (
"github.com/docker/docker/integration-cli/daemon" "github.com/docker/docker/integration-cli/daemon"
testdaemon "github.com/docker/docker/internal/test/daemon" testdaemon "github.com/docker/docker/internal/test/daemon"
"github.com/go-check/check" "github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/icmd"
"golang.org/x/sys/unix" "golang.org/x/sys/unix"
"gotest.tools/icmd"
) )
func setPortConfig(portConfig []swarm.PortConfig) testdaemon.ServiceConstructor { func setPortConfig(portConfig []swarm.PortConfig) testdaemon.ServiceConstructor {

View File

@ -26,8 +26,8 @@ import (
"github.com/docker/docker/internal/test/request" "github.com/docker/docker/internal/test/request"
"github.com/docker/swarmkit/ca" "github.com/docker/swarmkit/ca"
"github.com/go-check/check" "github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/assert" "gotest.tools/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp" is "gotest.tools/assert/cmp"
) )
var defaultReconciliationTimeout = 30 * time.Second var defaultReconciliationTimeout = 30 * time.Second

View File

@ -12,7 +12,7 @@ import (
"github.com/docker/docker/integration-cli/cli" "github.com/docker/docker/integration-cli/cli"
"github.com/go-check/check" "github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/icmd" "gotest.tools/icmd"
) )
const attachWait = 5 * time.Second const attachWait = 5 * time.Second

Some files were not shown because too many files have changed in this diff Show More