DockerCLI/e2e/cli-plugins
Ian Campbell 891b3d953e cli-plugins: use `docker system dial-stdio` to call the daemon
This means that plugins can use whatever methods the monolithic CLI supports,
which is good for consistency.

This relies on `os.Args[0]` being something which can be executed again to
reach the same binary, since it is propagated (via an envvar) to the plugin for
this purpose. This essentially requires that the current working directory and
path are not modified by the monolithic CLI before it launches the plugin nor
by the plugin before it initializes the client. This should be the case.

Previously the fake apiclient used by `TestExperimentalCLI` was not being used,
since `cli.Initialize` was unconditionally overwriting it with a real one
(talking to a real daemon during unit testing, it seems). This wasn't expected
nor desirable and no longer happens with the new arrangements, exposing the
fact that no `pingFunc` is provided, leading to a panic. Add a `pingFunc` to
the fake client to avoid this.

Signed-off-by: Ian Campbell <ijc@docker.com>
2019-02-18 11:53:37 +00:00
..
plugins/badmeta Add some simple e2e tests for executing CLI plugins 2019-01-30 13:44:05 +00:00
testdata Ignore unknown arguments on the top-level command. 2019-01-30 13:45:26 +00:00
dial_test.go cli-plugins: use `docker system dial-stdio` to call the daemon 2019-02-18 11:53:37 +00:00
help_test.go Ensure that plugins are only listed once in help outputs. 2019-01-30 13:55:42 +00:00
run_test.go Ignore unknown arguments on the top-level command. 2019-01-30 13:45:26 +00:00
util_test.go Add some simple e2e tests for executing CLI plugins 2019-01-30 13:44:05 +00:00