Signed-off-by: Daniel Nephin <dnephin@docker.com>
| ... | ... |
@@ -14,8 +14,8 @@ import ( |
| 14 | 14 |
"github.com/docker/docker/api/types/strslice" |
| 15 | 15 |
"github.com/docker/docker/builder" |
| 16 | 16 |
"github.com/docker/docker/builder/dockerfile/parser" |
| 17 |
+ "github.com/docker/docker/internal/testutil" |
|
| 17 | 18 |
"github.com/docker/docker/pkg/system" |
| 18 |
- "github.com/docker/docker/pkg/testutil" |
|
| 19 | 19 |
"github.com/docker/go-connections/nat" |
| 20 | 20 |
"github.com/stretchr/testify/assert" |
| 21 | 21 |
"github.com/stretchr/testify/require" |
| ... | ... |
@@ -10,8 +10,8 @@ import ( |
| 10 | 10 |
"testing" |
| 11 | 11 |
|
| 12 | 12 |
"github.com/docker/docker/builder" |
| 13 |
+ "github.com/docker/docker/internal/testutil" |
|
| 13 | 14 |
"github.com/docker/docker/pkg/archive" |
| 14 |
- "github.com/docker/docker/pkg/testutil" |
|
| 15 | 15 |
"github.com/stretchr/testify/assert" |
| 16 | 16 |
"github.com/stretchr/testify/require" |
| 17 | 17 |
) |
| ... | ... |
@@ -10,7 +10,7 @@ import ( |
| 10 | 10 |
"testing" |
| 11 | 11 |
|
| 12 | 12 |
"github.com/docker/docker/api/types" |
| 13 |
- "github.com/docker/docker/pkg/testutil" |
|
| 13 |
+ "github.com/docker/docker/internal/testutil" |
|
| 14 | 14 |
"github.com/stretchr/testify/assert" |
| 15 | 15 |
"github.com/stretchr/testify/require" |
| 16 | 16 |
"golang.org/x/net/context" |
| ... | ... |
@@ -4,7 +4,7 @@ import ( |
| 4 | 4 |
"testing" |
| 5 | 5 |
|
| 6 | 6 |
"github.com/docker/docker/daemon/config" |
| 7 |
- "github.com/docker/docker/pkg/testutil" |
|
| 7 |
+ "github.com/docker/docker/internal/testutil" |
|
| 8 | 8 |
"github.com/gotestyourself/gotestyourself/fs" |
| 9 | 9 |
"github.com/sirupsen/logrus" |
| 10 | 10 |
"github.com/spf13/pflag" |
| ... | ... |
@@ -8,8 +8,8 @@ import ( |
| 8 | 8 |
"testing" |
| 9 | 9 |
|
| 10 | 10 |
"github.com/docker/docker/daemon/discovery" |
| 11 |
+ "github.com/docker/docker/internal/testutil" |
|
| 11 | 12 |
"github.com/docker/docker/opts" |
| 12 |
- "github.com/docker/docker/pkg/testutil" |
|
| 13 | 13 |
"github.com/spf13/pflag" |
| 14 | 14 |
"github.com/stretchr/testify/assert" |
| 15 | 15 |
) |
| ... | ... |
@@ -9,7 +9,7 @@ import ( |
| 9 | 9 |
"github.com/docker/docker/api/types" |
| 10 | 10 |
containertypes "github.com/docker/docker/api/types/container" |
| 11 | 11 |
"github.com/docker/docker/container" |
| 12 |
- "github.com/docker/docker/pkg/testutil" |
|
| 12 |
+ "github.com/docker/docker/internal/testutil" |
|
| 13 | 13 |
"github.com/stretchr/testify/require" |
| 14 | 14 |
) |
| 15 | 15 |
|
| ... | ... |
@@ -8,7 +8,7 @@ import ( |
| 8 | 8 |
"github.com/docker/docker/api/types/container" |
| 9 | 9 |
"github.com/docker/docker/api/types/network" |
| 10 | 10 |
"github.com/docker/docker/integration/util/request" |
| 11 |
- "github.com/docker/docker/pkg/testutil" |
|
| 11 |
+ "github.com/docker/docker/internal/testutil" |
|
| 12 | 12 |
) |
| 13 | 13 |
|
| 14 | 14 |
func TestCreateFailsWhenIdentifierDoesNotExist(t *testing.T) {
|
| 15 | 15 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,13 @@ |
| 0 |
+package testutil |
|
| 1 |
+ |
|
| 2 |
+import ( |
|
| 3 |
+ "github.com/stretchr/testify/assert" |
|
| 4 |
+ "github.com/stretchr/testify/require" |
|
| 5 |
+) |
|
| 6 |
+ |
|
| 7 |
+// ErrorContains checks that the error is not nil, and contains the expected |
|
| 8 |
+// substring. |
|
| 9 |
+func ErrorContains(t require.TestingT, err error, expectedError string) {
|
|
| 10 |
+ require.Error(t, err) |
|
| 11 |
+ assert.Contains(t, err.Error(), expectedError) |
|
| 12 |
+} |
| 0 | 13 |
deleted file mode 100644 |
| ... | ... |
@@ -1,13 +0,0 @@ |
| 1 |
-package testutil |
|
| 2 |
- |
|
| 3 |
-import ( |
|
| 4 |
- "github.com/stretchr/testify/assert" |
|
| 5 |
- "github.com/stretchr/testify/require" |
|
| 6 |
-) |
|
| 7 |
- |
|
| 8 |
-// ErrorContains checks that the error is not nil, and contains the expected |
|
| 9 |
-// substring. |
|
| 10 |
-func ErrorContains(t require.TestingT, err error, expectedError string) {
|
|
| 11 |
- require.Error(t, err) |
|
| 12 |
- assert.Contains(t, err.Error(), expectedError) |
|
| 13 |
-} |