diff --git a/container_prune_test.go b/container_prune_test.go index 55e551bb4b..8a1c63897b 100644 --- a/container_prune_test.go +++ b/container_prune_test.go @@ -11,7 +11,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/pkg/testutil/assert" + "github.com/stretchr/testify/assert" "golang.org/x/net/context" ) @@ -24,7 +24,7 @@ func TestContainersPruneError(t *testing.T) { filters := filters.NewArgs() _, err := client.ContainersPrune(context.Background(), filters) - assert.Error(t, err, "Error response from daemon: Server error") + assert.EqualError(t, err, "Error response from daemon: Server error") } func TestContainersPrune(t *testing.T) { @@ -99,7 +99,7 @@ func TestContainersPrune(t *testing.T) { query := req.URL.Query() for key, expected := range listCase.expectedQueryParams { actual := query.Get(key) - assert.Equal(t, actual, expected) + assert.Equal(t, expected, actual) } content, err := json.Marshal(types.ContainersPruneReport{ ContainersDeleted: []string{"container_id1", "container_id2"}, @@ -117,8 +117,8 @@ func TestContainersPrune(t *testing.T) { } report, err := client.ContainersPrune(context.Background(), listCase.filters) - assert.NilError(t, err) - assert.Equal(t, len(report.ContainersDeleted), 2) - assert.Equal(t, report.SpaceReclaimed, uint64(9999)) + assert.NoError(t, err) + assert.Len(t, report.ContainersDeleted, 2) + assert.Equal(t, uint64(9999), report.SpaceReclaimed) } } diff --git a/image_prune_test.go b/image_prune_test.go index 5dfb173acc..453f84adee 100644 --- a/image_prune_test.go +++ b/image_prune_test.go @@ -11,7 +11,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/pkg/testutil/assert" + "github.com/stretchr/testify/assert" "golang.org/x/net/context" ) @@ -24,7 +24,7 @@ func TestImagesPruneError(t *testing.T) { filters := filters.NewArgs() _, err := client.ImagesPrune(context.Background(), filters) - assert.Error(t, err, "Error response from daemon: Server error") + assert.EqualError(t, err, "Error response from daemon: Server error") } func TestImagesPrune(t *testing.T) { @@ -87,7 +87,7 @@ func TestImagesPrune(t *testing.T) { query := req.URL.Query() for key, expected := range listCase.expectedQueryParams { actual := query.Get(key) - assert.Equal(t, actual, expected) + assert.Equal(t, expected, actual) } content, err := json.Marshal(types.ImagesPruneReport{ ImagesDeleted: []types.ImageDeleteResponseItem{ @@ -112,8 +112,8 @@ func TestImagesPrune(t *testing.T) { } report, err := client.ImagesPrune(context.Background(), listCase.filters) - assert.NilError(t, err) - assert.Equal(t, len(report.ImagesDeleted), 2) - assert.Equal(t, report.SpaceReclaimed, uint64(9999)) + assert.NoError(t, err) + assert.Len(t, report.ImagesDeleted, 2) + assert.Equal(t, uint64(9999), report.SpaceReclaimed) } } diff --git a/network_prune_test.go b/network_prune_test.go index 2bf4af4716..3e4f5d0415 100644 --- a/network_prune_test.go +++ b/network_prune_test.go @@ -11,7 +11,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/pkg/testutil/assert" + "github.com/stretchr/testify/assert" "golang.org/x/net/context" ) @@ -89,7 +89,7 @@ func TestNetworksPrune(t *testing.T) { query := req.URL.Query() for key, expected := range listCase.expectedQueryParams { actual := query.Get(key) - assert.Equal(t, actual, expected) + assert.Equal(t, expected, actual) } content, err := json.Marshal(types.NetworksPruneReport{ NetworksDeleted: []string{"network_id1", "network_id2"}, @@ -106,7 +106,7 @@ func TestNetworksPrune(t *testing.T) { } report, err := client.NetworksPrune(context.Background(), listCase.filters) - assert.NilError(t, err) - assert.Equal(t, len(report.NetworksDeleted), 2) + assert.NoError(t, err) + assert.Len(t, report.NetworksDeleted, 2) } }