1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/builder/dockerfile
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
..
command Builder default shell 2016-06-03 13:54:31 -07:00
parser Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
bflag.go Remove redundant format 2016-12-27 21:46:52 +08:00
bflag_test.go use t.Fatal() to output the err message where the values used for formatting 2017-02-23 10:16:22 +08:00
buildargs.go Refactor BuildArgs 2017-04-07 17:57:47 -04:00
buildargs_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
builder.go Keep parser.Directive internal to parser 2017-04-12 14:48:09 -04:00
builder_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
builder_unix.go Builder default shell 2016-06-03 13:54:31 -07:00
builder_windows.go Builder default shell 2016-06-03 13:54:31 -07:00
dispatchers.go Keep parser.Directive internal to parser 2017-04-12 14:48:09 -04:00
dispatchers_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
dispatchers_unix.go Cleanup in dispatcher.env 2017-04-11 14:44:28 -04:00
dispatchers_unix_test.go Builder dispatchers unit tests 2016-07-12 07:40:25 +02:00
dispatchers_windows.go Cleanup in dispatcher.env 2017-04-11 14:44:28 -04:00
dispatchers_windows_test.go Use filepath.Clean in normaliseWorkdir for windows 2016-10-31 13:27:05 -07:00
envVarTest Minor tweaks to quotes in env vars 2017-04-12 12:20:14 -07:00
evaluator.go Keep parser.Directive internal to parser 2017-04-12 14:48:09 -04:00
evaluator_test.go Keep parser.Directive internal to parser 2017-04-12 14:48:09 -04:00
evaluator_unix.go Enabling expose support for Windows TP5 2016-03-30 17:25:41 -07:00
evaluator_windows.go Windows: Allow user in builder 2016-11-14 14:10:47 -08:00
imagecontext.go builder: add an option for specifying build target 2017-04-10 16:21:43 -07:00
internals.go Keep parser.Directive internal to parser 2017-04-12 14:48:09 -04:00
internals_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
internals_unix.go Windows: Fix wildcard expansion after slash in filename 2016-09-14 11:40:57 -07:00
internals_windows.go Windows: Fix wildcard expansion after slash in filename 2016-09-14 11:40:57 -07:00
internals_windows_test.go Windows: Reduce CLI time, move some to unit tests 2016-05-06 12:26:08 -07:00
mockbackend_test.go Fix arg in from when arg is not defined 2017-04-07 17:57:47 -04:00
shell_parser.go Use a bytes.Buffer for shell_words string concat 2017-04-13 14:39:34 -04:00
shell_parser_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
support.go Builder default shell 2016-06-03 13:54:31 -07:00
support_test.go Unit tests for builder/dockerfile/support 2016-04-16 00:19:58 +02:00
utils_test.go Reimplement integration test for symlink Dockerfile as a unit test 2016-06-14 23:07:19 +02:00
wordsTest Minor tweaks to quotes in env vars 2017-04-12 12:20:14 -07:00