Commit Graph

15 Commits

Author SHA1 Message Date
a8b3ac7249 Remove cmd/docker and other directories in cli/ in accordance with the new Moby project scope
Starting with this commit, integration tests should no longer rely on
the docker cli, they should be API tests instead. For the existing tests
the scripts will use a frozen version of the docker cli with a
DOCKER_API_VERSION frozen to 1.30, which should ensure that the CI remains
green at all times.

To help contributors develop and test manually with a modified docker
cli, this commit also adds a DOCKER_CLI_PATH environment variable to the
Makefile. This allows to set the path of a custom cli that will be
available inside the development container and used to run the
integration tests.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 32915b1d0a315598edb737785d0357b5a1b8aa11
Component: engine
2017-05-05 12:14:29 -07:00
142883d5b3 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>
Upstream-commit: 6052f2b3969feadb01662d8e2f30337d9c7f61af
Component: engine
2017-04-14 12:03:21 -07:00
a532e48c46 fix the type
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: d735972d3150fa4e286ce468f033156fa22fddb7
Component: engine
2017-02-14 09:54:27 +08:00
77a99bbc10 Trim quotes from TLS flags.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: abe32de6b46825300f612864e6b4c98606a5bb0e
Component: engine
2017-01-03 15:58:41 -05:00
72d129024d Move package cliconfig to cli/config
I felt it made more sence 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ce964a607ad7395af7b74a0ba1efc5ab3cb15790
Component: engine
2016-12-25 20:31:52 +01:00
b5e0f7eb0f Change tls to TLS
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 113cae5ba2a0edadadbdf8aea06a52ab6b5f0361
Component: engine
2016-12-20 22:08:07 +08:00
d70c70756d Add for String
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: 167daf5060e75a597d70fd7240d59d34b160f8ef
Component: engine
2016-11-03 16:15:26 +08:00
3f0929f048 Merge pull request #27276 from yuexiao-wang/func-name
Modify function name from SetDaemonLogLevel to SetLogLevel
Upstream-commit: 62503f245f808a6847fe98a84bacfe5ed3bf5c18
Component: engine
2016-10-13 12:10:59 -07:00
a44c26a0a1 Modify function name from SetDaemonLogLevel to SetLogLevel
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: fe3ff54c7a87d475d5b2a799c5c85e6300c371db
Component: engine
2016-10-11 19:35:12 +08:00
01236b1c83 Improve --log-level help text
This information was added in
1efc940e6f547760e5e8f4648acb120ff19fdc58,
but removed again in
a271eaeba224652e3a12af0287afbae6f82a9333
to make the help-output fit in a 80-chars
terminal.

This adds the available options again
in the help output, and updates the CLI
reference documentation to match actual
output.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3197b312d03e6dc2c12a815bbc2632edfb03bb25
Component: engine
2016-10-10 23:10:17 +02:00
9d7fdddb73 Update unit tests for new cobra root command.
Cleanup cobra integration
Update windows files for cobra and pflags
Cleanup SetupRootcmd, and remove unnecessary SetFlagErrorFunc.
Use cobra command traversal

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 31bf9ca0c8cf29c1ba6cdc044e81c574161a0392
Component: engine
2016-08-25 13:09:04 -04:00
8c3fcf2de5 Convert docker root command to use pflag and cobra
Fix the daemon proxy for cobra commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0452ff5a4dd1b8fba707235d6f12a4038208f34b
Component: engine
2016-08-25 13:09:03 -04:00
894a7b4b95 Convert dockerd to use cobra and pflag
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fb83394714a9797f8ca5a08023a89560ce6c4aa3
Component: engine
2016-08-25 13:09:03 -04:00
63df8770d3 Cleanup the structure of the cli package.
Move all flags into cli/flags
Move usage help into cli/usage.go

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 33c9edaf6c5401fc1891713d1ad8d861e6cea51f
Component: engine
2016-04-27 14:25:47 -04:00
dcd6f9747a Build two binaries client and daemon.
Add a proxy to support 'docker daemon'
Fix configFile option, and remove a test that is no longer relevant.
Remove daemon build tag.
Remove DOCKER_CLIENTONLY from build scripts.

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Change docker-daemon to dockerd.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9e7651db4d464649bc32cf346fdee8c6900ebe0f
Component: engine
2016-04-22 11:26:01 -04:00