@ -12,8 +12,9 @@ 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"
|
||||
is "github.com/gotestyourself/gotestyourself/assert/cmp"
|
||||
"github.com/gotestyourself/gotestyourself/golden"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestNodePsErrors(t *testing.T) {
|
||||
@ -60,7 +61,7 @@ func TestNodePsErrors(t *testing.T) {
|
||||
cmd.Flags().Set(key, value)
|
||||
}
|
||||
cmd.SetOutput(ioutil.Discard)
|
||||
assert.EqualError(t, cmd.Execute(), tc.expectedError)
|
||||
assert.Check(t, is.Error(cmd.Execute(), tc.expectedError))
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,7 +123,7 @@ func TestNodePs(t *testing.T) {
|
||||
for key, value := range tc.flags {
|
||||
cmd.Flags().Set(key, value)
|
||||
}
|
||||
assert.NoError(t, cmd.Execute())
|
||||
assert.Check(t, cmd.Execute())
|
||||
golden.Assert(t, cli.OutBuffer().String(), fmt.Sprintf("node-ps.%s.golden", tc.name))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user