1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/opts
Aaron Lehmann 6052f2b396 Remove pkg/testutil/assert in favor of testify
I noticed that we're using a homegrown package for assertions. The
functions are extremely similar to testify, but with enough slight
differences to be confusing (for example, Equal takes its arguments in a
different order). We already vendor testify, and it's used in a few
places by tests.

I also found some problems with pkg/testutil/assert. For example, the
NotNil function seems to be broken. It checks the argument against
"nil", which only works for an interface. If you pass in a nil map or
slice, the equality check will fail.

In the interest of avoiding NIH, I'm proposing replacing
pkg/testutil/assert with testify. The test code looks almost the same,
but we avoid the confusion of having two similar but slightly different
assertion packages, and having to maintain our own package instead of
using a commonly-used one.

In the process, I found a few places where the tests should halt if an
assertion fails, so I've made those cases (that I noticed) use "require"
instead of "assert", and I've vendored the "require" package from
testify alongside the already-present "assert" package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-14 12:03:21 -07:00
..
env.go
env_test.go
hosts.go
hosts_test.go
hosts_unix.go
hosts_windows.go
ip.go
ip_test.go
mount.go Merge pull request #30597 from dnephin/add-expanded-mount-format-to-stack-deploy 2017-03-14 17:53:28 +00:00
mount_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
opts.go Make the CLI show defaults from the swarmkit defaults package 2017-04-10 13:41:18 -07:00
opts_test.go Make the CLI show defaults from the swarmkit defaults package 2017-04-10 13:41:18 -07:00
opts_unix.go
opts_windows.go
port.go
port_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
quotedstring.go
quotedstring_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
runtime.go
secret.go api: Remove SecretRequestOption type 2017-03-16 11:20:31 -07:00
secret_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
throttledevice.go
ulimit.go
ulimit_test.go
weightdevice.go