1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/cli/command/formatter
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
..
checkpoint.go Use formatter in docker checkpoint ls 2017-03-19 09:24:15 +02:00
checkpoint_test.go Use formatter in docker checkpoint ls 2017-03-19 09:24:15 +02:00
container.go Merge pull request #30733 from yongtang/02022017-formatter-header 2017-03-03 11:25:19 -08:00
container_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
custom.go Allow --format to use different delim in table format 2017-02-10 19:34:50 -08:00
custom_test.go
diff.go Use formatter in docker diff 2017-03-30 10:33:40 +03:00
diff_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
disk_usage.go Add format to the docker system df command 2017-04-10 13:04:03 +03:00
disk_usage_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
formatter.go Replace fmt.Errorf() with errors.Errorf() in the cli 2017-03-24 16:58:07 -04:00
image.go Ignore some functions in the Go template when header is rendered 2017-02-10 19:34:50 -08:00
image_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
network.go Allow --format to use different delim in table format 2017-02-10 19:34:50 -08:00
network_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
node.go Adopt text/template in node inspect 2017-04-10 17:47:15 +05:30
node_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
plugin.go Allow --format to use different delim in table format 2017-02-10 19:34:50 -08:00
plugin_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
reflect.go Replace fmt.Errorf() with errors.Errorf() in the cli 2017-03-24 16:58:07 -04:00
reflect_test.go Fix broken JSON support in cli/command/formatter 2016-10-17 08:07:17 +00:00
secret.go Add format to secret ls 2017-03-19 09:22:30 +02:00
secret_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
service.go Show network names in "docker service inspect --pretty" 2017-04-07 16:46:25 -07:00
service_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
stats.go Allow --format to use different delim in table format 2017-02-10 19:34:50 -08:00
stats_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
task.go Fix error caused by overlapping merge of 30733 2017-03-03 13:26:00 -08:00
task_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
volume.go Allow --format to use different delim in table format 2017-02-10 19:34:50 -08:00
volume_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00