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:
@ -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.
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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 {
|
||||||
|
@ -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) {
|
||||||
|
@ -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 {
|
||||||
|
@ -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 {
|
||||||
|
@ -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) {
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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
|
||||||
|
@ -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)
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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 {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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)
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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.
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -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()) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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 (
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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
|
||||||
|
@ -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 (
|
||||||
|
@ -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) {
|
||||||
|
@ -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
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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
|
||||||
|
@ -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 (
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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
|
||||||
|
@ -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) {
|
||||||
|
@ -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
|
||||||
|
@ -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) {
|
||||||
|
@ -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.
|
||||||
|
@ -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
|
||||||
|
@ -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) {
|
||||||
|
@ -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
|
||||||
|
@ -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()) {
|
||||||
|
@ -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 = `{
|
||||||
|
@ -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) {
|
||||||
|
@ -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 {
|
||||||
|
@ -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
|
||||||
|
@ -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 {
|
||||||
|
@ -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,
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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 {
|
||||||
|
@ -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
|
||||||
|
@ -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
Reference in New Issue
Block a user