Commit Graph

6 Commits

Author SHA1 Message Date
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
Yong Tang cf4b7a5b87 Add compose support of `attachable` in networks
This fix tries to address the issue raised in 29975 where
it was not possible to specify `attachable` flag for networks
in compose format.

NOTE: Compose format aleady supports `labels` in networks.

This fix adds the support of `attachable` for compose v3.1 format.

Additiona unit tests have been updated and added.

This fix fixes 29975.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-04 14:16:06 -08:00
Daniel Nephin 6ec84ef76d Add integration test for stack deploy with secrets.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-26 11:33:15 -05:00
Vincent Demeester 3191f5809b
Few stack deploy network fixes
- Make sure we use the correct network name for external ones.
- Make the default network overridable and only creates networks that
  are used by services — so that default network is only created if a
  service doesn't declare a network.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-10 10:29:09 +01:00
Daniel Nephin f5af9b9738 Replace vendor of aanand/compose-file with a local copy.
Add go-bindata for including the schema.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-12-27 16:17:24 -05:00
Daniel Nephin 643fd775ed Move pkg to cli/compose/convert
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-12-16 12:27:31 -05:00
Renamed from pkg/composetransform/compose_test.go (Browse further)