Skip to content

Commit

Permalink
Merge pull request moby#39829 from SamWhited/testutil
Browse files Browse the repository at this point in the history
testutil: make testing packages public
  • Loading branch information
thaJeztah authored Sep 11, 2019
2 parents cd9e4ec + b37c214 commit 09226c4
Show file tree
Hide file tree
Showing 132 changed files with 262 additions and 259 deletions.
10 changes: 5 additions & 5 deletions integration-cli/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/cli/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io"
"strings"

"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/testutil/fakecontext"
"gotest.tools/icmd"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_api_attach_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions integration-cli/docker_api_build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions integration-cli/docker_api_build_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_api_containers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_api_exec_resize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_api_exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_api_images_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_api_logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_api_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_api_stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_api_swarm_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions integration-cli/docker_api_swarm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
8 changes: 4 additions & 4 deletions integration-cli/docker_cli_build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_cli_build_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_cli_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_cli_daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_cli_external_volume_driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_cli_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_cli_network_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_cli_plugins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_cli_registry_user_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"regexp"
"testing"

"github.com/docker/docker/internal/test/registry"
"github.com/docker/docker/testutil/registry"
"gotest.tools/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions integration-cli/docker_cli_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_cli_update_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_cli_v2_only_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"testing"

"github.com/docker/docker/internal/test/registry"
"github.com/docker/docker/testutil/registry"
"gotest.tools/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_deprecated_api_v124_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_deprecated_api_v124_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/docker/docker/internal/test/request"
"github.com/docker/docker/testutil/request"
"gotest.tools/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/docker_hub_pull_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/environment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os"
"os/exec"

"github.com/docker/docker/internal/test/environment"
"github.com/docker/docker/testutil/environment"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/fixtures_linux_daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/requirements_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion integration-cli/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions integration/build/build_cgroupns_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions integration/build/build_session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions integration/build/build_squash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading

0 comments on commit 09226c4

Please sign in to comment.