Update tests to use gotest.tools 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2018-06-08 18:24:26 +02:00
parent dd9478a1f7
commit 2c4de4fb5e
176 changed files with 389 additions and 389 deletions

View File

@ -9,9 +9,9 @@ import (
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types"
volumetypes "github.com/docker/docker/api/types/volume"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func TestVolumeCreateErrors(t *testing.T) {

View File

@ -10,8 +10,8 @@ import (
"github.com/pkg/errors"
// Import builders to get the builder function as package function
. "github.com/docker/cli/internal/test/builders"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/gotestyourself/gotestyourself/golden"
"gotest.tools/assert"
"gotest.tools/golden"
)
func TestVolumeInspectErrors(t *testing.T) {

View File

@ -12,8 +12,8 @@ import (
"github.com/pkg/errors"
// Import builders to get the builder function as package function
. "github.com/docker/cli/internal/test/builders"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/gotestyourself/gotestyourself/golden"
"gotest.tools/assert"
"gotest.tools/golden"
)
func TestVolumeListErrors(t *testing.T) {

View File

@ -11,10 +11,10 @@ import (
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/gotestyourself/gotestyourself/golden"
"github.com/gotestyourself/gotestyourself/skip"
"github.com/pkg/errors"
"gotest.tools/assert"
"gotest.tools/golden"
"gotest.tools/skip"
)
func TestVolumePruneErrors(t *testing.T) {
@ -79,7 +79,7 @@ func TestVolumePruneForce(t *testing.T) {
func TestVolumePrunePromptYes(t *testing.T) {
// FIXME(vdemeester) make it work..
skip.IfCondition(t, runtime.GOOS == "windows", "TODO: fix test on windows")
skip.If(t, runtime.GOOS == "windows", "TODO: fix test on windows")
for _, input := range []string{"y", "Y"} {
cli := test.NewFakeCli(&fakeClient{
@ -95,7 +95,7 @@ func TestVolumePrunePromptYes(t *testing.T) {
func TestVolumePrunePromptNo(t *testing.T) {
// FIXME(vdemeester) make it work..
skip.IfCondition(t, runtime.GOOS == "windows", "TODO: fix test on windows")
skip.If(t, runtime.GOOS == "windows", "TODO: fix test on windows")
for _, input := range []string{"n", "N", "no", "anything", "really"} {
cli := test.NewFakeCli(&fakeClient{

View File

@ -5,8 +5,8 @@ import (
"testing"
"github.com/docker/cli/internal/test"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/pkg/errors"
"gotest.tools/assert"
)
func TestVolumeRemoveErrors(t *testing.T) {