testutil: make testing packages public

This was done with something along the lines of:

```
mv internal/test testutil
pushd testutil/; grep -IRl "package test" | xargs -I '{}' sed -i -e 's|package test|package testutil|g' {}; popd
mv internal/testutil/*.go testutil/ && rm -rf internal/
grep -IRl "github.com\/docker\/docker\/internal\/test" | xargs -I '{}' sed -i -e 's|github.com/docker/docker/internal/test|github.com/docker/docker/test|g' {}
goimports .
```

I also modified the basic plugin path in testutil/fixtures/plugin.

Signed-off-by: Sam Whited <sam@samwhited.com>
This commit is contained in:
Sam Whited 2019-08-29 15:52:40 -05:00
parent cd9e4ec240
commit b37c214e3c
132 changed files with 262 additions and 259 deletions

View File

@ -19,13 +19,13 @@ import (
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/integration-cli/daemon"
"github.com/docker/docker/integration-cli/environment"
testdaemon "github.com/docker/docker/internal/test/daemon"
ienv "github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/internal/test/fakestorage"
"github.com/docker/docker/internal/test/fixtures/plugin"
"github.com/docker/docker/internal/test/registry"
"github.com/docker/docker/internal/test/suite"
"github.com/docker/docker/pkg/reexec"
testdaemon "github.com/docker/docker/testutil/daemon"
ienv "github.com/docker/docker/testutil/environment"
"github.com/docker/docker/testutil/fakestorage"
"github.com/docker/docker/testutil/fixtures/plugin"
"github.com/docker/docker/testutil/registry"
"gotest.tools/assert"
)

View File

@ -4,7 +4,7 @@ import (
"io"
"strings"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/testutil/fakecontext"
"gotest.tools/icmd"
)

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/testutil/daemon"
"github.com/pkg/errors"
"gotest.tools/assert"
"gotest.tools/icmd"

View File

@ -15,8 +15,8 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/docker/testutil/request"
"github.com/pkg/errors"
"golang.org/x/net/websocket"
"gotest.tools/assert"

View File

@ -14,10 +14,10 @@ import (
"testing"
"github.com/docker/docker/api/types"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/internal/test/fakegit"
"github.com/docker/docker/internal/test/fakestorage"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/fakecontext"
"github.com/docker/docker/testutil/fakegit"
"github.com/docker/docker/testutil/fakestorage"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)

View File

@ -6,8 +6,8 @@ import (
"net/http"
"testing"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/fakecontext"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)

View File

@ -25,10 +25,10 @@ import (
"github.com/docker/docker/client"
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/integration-cli/cli/build"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/mount"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/testutil/request"
"github.com/docker/docker/volume"
"github.com/docker/go-connections/nat"
"gotest.tools/assert"

View File

@ -11,7 +11,7 @@ import (
"testing"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
)

View File

@ -16,7 +16,7 @@ import (
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/client"
"github.com/docker/docker/integration-cli/checker"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
"gotest.tools/poll"
)

View File

@ -14,8 +14,8 @@ import (
"github.com/docker/docker/client"
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/integration-cli/cli/build"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/pkg/parsers/kernel"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
)

View File

@ -15,8 +15,8 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
)

View File

@ -13,7 +13,7 @@ import (
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
)

View File

@ -16,7 +16,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/client"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
)

View File

@ -16,7 +16,7 @@ import (
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/integration-cli/cli/build"
"github.com/docker/docker/integration-cli/daemon"
testdaemon "github.com/docker/docker/internal/test/daemon"
testdaemon "github.com/docker/docker/testutil/daemon"
"golang.org/x/sys/unix"
"gotest.tools/assert"
"gotest.tools/icmd"

View File

@ -24,8 +24,8 @@ import (
"github.com/docker/docker/client"
"github.com/docker/docker/integration-cli/checker"
"github.com/docker/docker/integration-cli/daemon"
testdaemon "github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/internal/test/request"
testdaemon "github.com/docker/docker/testutil/daemon"
"github.com/docker/docker/testutil/request"
"github.com/docker/swarmkit/ca"
"github.com/pkg/errors"
"gotest.tools/assert"

View File

@ -11,7 +11,7 @@ import (
"github.com/docker/docker/api"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
)

View File

@ -19,12 +19,12 @@ import (
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/integration-cli/cli/build"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/internal/test/fakegit"
"github.com/docker/docker/internal/test/fakestorage"
"github.com/docker/docker/internal/testutil"
"github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/system"
"github.com/docker/docker/testutil"
"github.com/docker/docker/testutil/fakecontext"
"github.com/docker/docker/testutil/fakegit"
"github.com/docker/docker/testutil/fakestorage"
"github.com/moby/buildkit/frontend/dockerfile/command"
"github.com/opencontainers/go-digest"
"gotest.tools/assert"

View File

@ -18,7 +18,7 @@ import (
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/integration-cli/cli/build"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/testutil/fakecontext"
"github.com/docker/go-units"
"gotest.tools/assert"
"gotest.tools/icmd"

View File

@ -11,8 +11,8 @@ import (
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/integration-cli/cli/build"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/testutil/fakecontext"
"github.com/docker/go-connections/nat"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"

View File

@ -31,9 +31,9 @@ import (
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/integration-cli/cli/build"
"github.com/docker/docker/integration-cli/daemon"
testdaemon "github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/opts"
"github.com/docker/docker/pkg/mount"
testdaemon "github.com/docker/docker/testutil/daemon"
"github.com/docker/go-units"
"github.com/docker/libnetwork/iptables"
"github.com/docker/libtrust"

View File

@ -16,8 +16,8 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/integration-cli/daemon"
testdaemon "github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/pkg/stringid"
testdaemon "github.com/docker/docker/testutil/daemon"
"github.com/docker/docker/volume"
"gotest.tools/assert"
)

View File

@ -8,7 +8,7 @@ import (
"testing"
"github.com/docker/docker/integration-cli/daemon"
testdaemon "github.com/docker/docker/internal/test/daemon"
testdaemon "github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
)

View File

@ -18,9 +18,9 @@ import (
"github.com/docker/docker/api/types/versions/v1p20"
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/integration-cli/daemon"
testdaemon "github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/runconfig"
testdaemon "github.com/docker/docker/testutil/daemon"
"github.com/docker/libnetwork/driverapi"
remoteapi "github.com/docker/libnetwork/drivers/remote/api"
"github.com/docker/libnetwork/ipamapi"

View File

@ -15,7 +15,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/integration-cli/daemon"
"github.com/docker/docker/internal/test/fixtures/plugin"
"github.com/docker/docker/testutil/fixtures/plugin"
"gotest.tools/assert"
)

View File

@ -8,7 +8,7 @@ import (
"regexp"
"testing"
"github.com/docker/docker/internal/test/registry"
"github.com/docker/docker/testutil/registry"
"gotest.tools/assert"
)

View File

@ -26,12 +26,12 @@ import (
"github.com/docker/docker/client"
"github.com/docker/docker/integration-cli/cli"
"github.com/docker/docker/integration-cli/cli/build"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/internal/testutil"
"github.com/docker/docker/pkg/mount"
"github.com/docker/docker/pkg/parsers/kernel"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/runconfig"
"github.com/docker/docker/testutil"
"github.com/docker/docker/testutil/fakecontext"
"github.com/docker/go-connections/nat"
"github.com/docker/libnetwork/resolvconf"
"github.com/docker/libnetwork/types"

View File

@ -14,8 +14,8 @@ import (
"github.com/creack/pty"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/pkg/parsers/kernel"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
)

View File

@ -7,7 +7,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/registry"
"github.com/docker/docker/testutil/registry"
"gotest.tools/assert"
)

View File

@ -9,7 +9,7 @@ import (
"testing"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)

View File

@ -6,7 +6,7 @@ import (
"strings"
"testing"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
)

View File

@ -7,7 +7,7 @@ import (
"testing"
"github.com/docker/docker/integration-cli/daemon"
testdaemon "github.com/docker/docker/internal/test/daemon"
testdaemon "github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
)

View File

@ -4,7 +4,7 @@ import (
"os"
"os/exec"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var (

View File

@ -10,7 +10,7 @@ import (
"strings"
"testing"
"github.com/docker/docker/internal/test/fixtures/load"
"github.com/docker/docker/testutil/fixtures/load"
"gotest.tools/assert"
)

View File

@ -16,7 +16,7 @@ import (
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/client"
"github.com/docker/docker/integration-cli/requirement"
"github.com/docker/docker/internal/test/registry"
"github.com/docker/docker/testutil/registry"
)
func ArchitectureIsNot(arch string) bool {

View File

@ -8,7 +8,7 @@ import (
"strings"
"testing"
"github.com/docker/docker/internal/testutil"
"github.com/docker/docker/testutil"
"github.com/pkg/errors"
"gotest.tools/icmd"
)

View File

@ -9,9 +9,9 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/integration/internal/requirement"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/testutil/daemon"
"github.com/docker/docker/testutil/fakecontext"
"gotest.tools/assert"
"gotest.tools/skip"
)

View File

@ -11,8 +11,8 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/versions"
dclient "github.com/docker/docker/client"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/fakecontext"
"github.com/docker/docker/testutil/request"
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/session/filesync"
"golang.org/x/sync/errgroup"

View File

@ -11,9 +11,9 @@ import (
"github.com/docker/docker/api/types"
dclient "github.com/docker/docker/client"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/docker/testutil/daemon"
"github.com/docker/docker/testutil/fakecontext"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/skip"

View File

@ -14,8 +14,8 @@ import (
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/errdefs"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/testutil/fakecontext"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/skip"

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -15,8 +15,8 @@ import (
swarmtypes "github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/client"
"github.com/docker/docker/integration/internal/swarm"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/poll"

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -13,7 +13,7 @@ import (
mounttypes "github.com/docker/docker/api/types/mount"
"github.com/docker/docker/client"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/poll"

View File

@ -4,7 +4,7 @@ import (
"net/http"
"testing"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)

View File

@ -13,8 +13,8 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/testutil/fakecontext"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/skip"

View File

@ -15,8 +15,8 @@ import (
"github.com/docker/docker/client"
"github.com/docker/docker/errdefs"
ctr "github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/oci"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/poll"

View File

@ -10,7 +10,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/testutil/daemon"
"golang.org/x/sys/unix"
"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/filters"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/poll"

View File

@ -8,7 +8,7 @@ import (
"github.com/docker/docker/client"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/poll"

View File

@ -14,8 +14,8 @@ import (
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/client"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/daemon"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/fs"

View File

@ -7,7 +7,7 @@ import (
"github.com/docker/docker/client"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/poll"

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -11,7 +11,7 @@ import (
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/poll"

View File

@ -9,7 +9,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/integration/internal/container"
req "github.com/docker/docker/internal/test/request"
req "github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/poll"

View File

@ -8,7 +8,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
"gotest.tools/skip"
)

View File

@ -9,7 +9,7 @@ import (
"github.com/docker/docker/client"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/integration/internal/requirement"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/poll"

View File

@ -10,7 +10,7 @@ import (
containertypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/client"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/poll"

View File

@ -6,7 +6,7 @@ import (
"time"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/poll"

View File

@ -9,8 +9,8 @@ import (
"testing"
"github.com/docker/docker/api/types"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/internal/testutil"
"github.com/docker/docker/testutil"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
"gotest.tools/skip"
)

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -14,8 +14,8 @@ import (
"unsafe"
"github.com/docker/docker/api/types"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/testutil/daemon"
"github.com/docker/docker/testutil/fakecontext"
"gotest.tools/assert"
"gotest.tools/skip"
)

View File

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/docker/docker/internal/testutil"
"github.com/docker/docker/testutil"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/skip"

View File

@ -10,8 +10,8 @@ import (
"github.com/docker/docker/api/types/filters"
swarmtypes "github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/client"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/daemon"
"github.com/docker/docker/testutil/environment"
"gotest.tools/assert"
"gotest.tools/poll"
"gotest.tools/skip"

View File

@ -15,7 +15,7 @@ import (
"github.com/docker/docker/integration/internal/container"
net "github.com/docker/docker/integration/internal/network"
n "github.com/docker/docker/integration/network"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
"gotest.tools/skip"
)

View File

@ -7,7 +7,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -12,7 +12,7 @@ import (
"github.com/docker/docker/integration/internal/container"
net "github.com/docker/docker/integration/internal/network"
n "github.com/docker/docker/integration/network"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
"gotest.tools/skip"
)

View File

@ -7,7 +7,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -10,8 +10,8 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/daemon"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/skip"

View File

@ -11,7 +11,7 @@ import (
"github.com/docker/docker/client"
"github.com/docker/docker/integration/internal/network"
"github.com/docker/docker/integration/internal/swarm"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
"gotest.tools/icmd"
"gotest.tools/poll"

View File

@ -22,9 +22,9 @@ import (
eventtypes "github.com/docker/docker/api/types/events"
"github.com/docker/docker/client"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/authorization"
"github.com/docker/docker/testutil/environment"
"gotest.tools/assert"
"gotest.tools/poll"
"gotest.tools/skip"

View File

@ -12,10 +12,10 @@ import (
"strings"
"testing"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/pkg/authorization"
"github.com/docker/docker/pkg/plugins"
"github.com/docker/docker/testutil/daemon"
"github.com/docker/docker/testutil/environment"
"gotest.tools/skip"
)

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -4,7 +4,7 @@ import (
"net/http"
"testing"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)

View File

@ -19,9 +19,9 @@ import (
"github.com/docker/docker/daemon/graphdriver/vfs"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/integration/internal/requirement"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/plugins"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/skip"

View File

@ -5,8 +5,8 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/pkg/reexec"
"github.com/docker/docker/testutil/environment"
)
var (

View File

@ -9,8 +9,8 @@ import (
"time"
"github.com/docker/docker/api/types"
"github.com/docker/docker/internal/test/fixtures/plugin"
"github.com/docker/docker/pkg/locker"
"github.com/docker/docker/testutil/fixtures/plugin"
"github.com/pkg/errors"
)

View File

@ -10,7 +10,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
"gotest.tools/skip"
)

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var (

View File

@ -7,7 +7,7 @@ import (
"testing"
"github.com/docker/docker/api/types"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
"gotest.tools/skip"
)

View File

@ -9,8 +9,8 @@ import (
"time"
"github.com/docker/docker/api/types"
"github.com/docker/docker/internal/test/fixtures/plugin"
"github.com/docker/docker/pkg/locker"
"github.com/docker/docker/testutil/fixtures/plugin"
"github.com/pkg/errors"
"gotest.tools/assert"
)

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var (

View File

@ -7,8 +7,8 @@ import (
"testing"
"github.com/docker/docker/api/types"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/internal/test/fixtures/plugin"
"github.com/docker/docker/testutil/daemon"
"github.com/docker/docker/testutil/fixtures/plugin"
"gotest.tools/assert"
"gotest.tools/skip"
)

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -15,7 +15,7 @@ import (
"github.com/docker/docker/errdefs"
"github.com/docker/docker/integration/internal/network"
"github.com/docker/docker/integration/internal/swarm"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/poll"

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -14,9 +14,9 @@ import (
swarmtypes "github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/api/types/swarm/runtime"
"github.com/docker/docker/integration/internal/swarm"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/internal/test/fixtures/plugin"
"github.com/docker/docker/internal/test/registry"
"github.com/docker/docker/testutil/daemon"
"github.com/docker/docker/testutil/fixtures/plugin"
"github.com/docker/docker/testutil/registry"
"gotest.tools/assert"
"gotest.tools/poll"
"gotest.tools/skip"

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -5,7 +5,7 @@ import (
"testing"
"github.com/docker/docker/api/types/versions"
req "github.com/docker/docker/internal/test/request"
req "github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/skip"

View File

@ -7,7 +7,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
"gotest.tools/skip"

View File

@ -15,9 +15,9 @@ import (
"github.com/docker/docker/api/types/strslice"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/request"
req "github.com/docker/docker/internal/test/request"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/testutil/request"
req "github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/skip"

View File

@ -7,7 +7,7 @@ import (
"net/http"
"testing"
req "github.com/docker/docker/internal/test/request"
req "github.com/docker/docker/testutil/request"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)

View File

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/docker/docker/internal/test/daemon"
"github.com/docker/docker/testutil/daemon"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
"gotest.tools/skip"

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -6,7 +6,7 @@ import (
"testing"
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
"gotest.tools/skip"
)

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)
var testEnv *environment.Execution

View File

@ -12,7 +12,7 @@ import (
"github.com/docker/docker/api/types/filters"
volumetypes "github.com/docker/docker/api/types/volume"
"github.com/docker/docker/integration/internal/container"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"github.com/google/go-cmp/cmp/cmpopts"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"

View File

@ -5,7 +5,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/internal/test"
"github.com/docker/docker/testutil"
"gotest.tools/assert"
)
@ -14,7 +14,7 @@ type ConfigConstructor func(*swarm.Config)
// CreateConfig creates a config given the specified spec
func (d *Daemon) CreateConfig(t assert.TestingT, configSpec swarm.ConfigSpec) string {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
cli := d.NewClientT(t)
@ -27,7 +27,7 @@ func (d *Daemon) CreateConfig(t assert.TestingT, configSpec swarm.ConfigSpec) st
// ListConfigs returns the list of the current swarm configs
func (d *Daemon) ListConfigs(t assert.TestingT) []swarm.Config {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
cli := d.NewClientT(t)
@ -40,7 +40,7 @@ func (d *Daemon) ListConfigs(t assert.TestingT) []swarm.Config {
// GetConfig returns a swarm config identified by the specified id
func (d *Daemon) GetConfig(t assert.TestingT, id string) *swarm.Config {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
cli := d.NewClientT(t)
@ -53,7 +53,7 @@ func (d *Daemon) GetConfig(t assert.TestingT, id string) *swarm.Config {
// DeleteConfig removes the swarm config identified by the specified id
func (d *Daemon) DeleteConfig(t assert.TestingT, id string) {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
cli := d.NewClientT(t)
@ -66,7 +66,7 @@ func (d *Daemon) DeleteConfig(t assert.TestingT, id string) {
// UpdateConfig updates the swarm config identified by the specified id
// Currently, only label update is supported.
func (d *Daemon) UpdateConfig(t assert.TestingT, id string, f ...ConfigConstructor) {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
cli := d.NewClientT(t)

View File

@ -4,13 +4,13 @@ import (
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/internal/test"
"github.com/docker/docker/testutil"
"gotest.tools/assert"
)
// ActiveContainers returns the list of ids of the currently running containers
func (d *Daemon) ActiveContainers(t assert.TestingT) []string {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
cli := d.NewClientT(t)
@ -28,7 +28,7 @@ func (d *Daemon) ActiveContainers(t assert.TestingT) []string {
// FindContainerIP returns the ip of the specified container
func (d *Daemon) FindContainerIP(t assert.TestingT, id string) string {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
cli := d.NewClientT(t)

View File

@ -1,4 +1,4 @@
package daemon // import "github.com/docker/docker/internal/test/daemon"
package daemon // import "github.com/docker/docker/testutil/daemon"
import (
"context"
@ -17,11 +17,11 @@ import (
"github.com/docker/docker/api/types/events"
"github.com/docker/docker/client"
"github.com/docker/docker/daemon/images"
"github.com/docker/docker/internal/test"
"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/opts"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/testutil"
"github.com/docker/docker/testutil/request"
"github.com/docker/go-connections/sockets"
"github.com/docker/go-connections/tlsconfig"
"github.com/pkg/errors"
@ -95,7 +95,7 @@ type Daemon struct {
// This will create a directory such as d123456789 in the folder specified by $DOCKER_INTEGRATION_DAEMON_DEST or $DEST.
// The daemon will not automatically start.
func New(t testingT, ops ...func(*Daemon)) *Daemon {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
dest := os.Getenv("DOCKER_INTEGRATION_DAEMON_DEST")
@ -191,7 +191,7 @@ func (d *Daemon) ReadLogFile() ([]byte, error) {
// NewClientT creates new client based on daemon's socket path
func (d *Daemon) NewClientT(t assert.TestingT, extraOpts ...client.Opt) *client.Client {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
@ -208,7 +208,7 @@ func (d *Daemon) NewClientT(t assert.TestingT, extraOpts ...client.Opt) *client.
// Cleanup cleans the daemon files : exec root (network namespaces, ...), swarmkit files
func (d *Daemon) Cleanup(t testingT) {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
// Cleanup swarmkit wal files if present
@ -218,7 +218,7 @@ func (d *Daemon) Cleanup(t testingT) {
// Start starts the daemon and return once it is ready to receive requests.
func (d *Daemon) Start(t testingT, args ...string) {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
if err := d.StartWithError(args...); err != nil {
@ -374,7 +374,7 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error {
// StartWithBusybox will first start the daemon with Daemon.Start()
// then save the busybox image from the main daemon and load it into this Daemon instance.
func (d *Daemon) StartWithBusybox(t testingT, arg ...string) {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
d.Start(t, arg...)
@ -433,7 +433,7 @@ func (d *Daemon) DumpStackAndQuit() {
// instantiate a new one with NewDaemon.
// If an error occurs while starting the daemon, the test will fail.
func (d *Daemon) Stop(t testingT) {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
err := d.StopWithError()
@ -521,7 +521,7 @@ out2:
// Restart will restart the daemon by first stopping it and the starting it.
// If an error occurs while starting the daemon, the test will fail.
func (d *Daemon) Restart(t testingT, args ...string) {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
d.Stop(t)
@ -597,7 +597,7 @@ func (d *Daemon) ReloadConfig() error {
// LoadBusybox image into the daemon
func (d *Daemon) LoadBusybox(t assert.TestingT) {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
clientHost, err := client.NewClientWithOpts(client.FromEnv)
@ -711,7 +711,7 @@ func (d *Daemon) queryRootDir() (string, error) {
// Info returns the info struct for this daemon
func (d *Daemon) Info(t assert.TestingT) types.Info {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
c := d.NewClientT(t)
@ -721,7 +721,7 @@ func (d *Daemon) Info(t assert.TestingT) types.Info {
}
func cleanupRaftDir(t testingT, rootPath string) {
if ht, ok := t.(test.HelperT); ok {
if ht, ok := t.(testutil.HelperT); ok {
ht.Helper()
}
for _, p := range []string{"wal", "wal-v3-encrypted", "snap-v3-encrypted"} {

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