DockerCLI/e2e
Ian Campbell b8bfba8dc6
cli-plugins: fix when plugin does not use PersistentPreRun* hooks
This regressed in 3af168c7df ("Ensure plugins can use `PersistentPreRunE`
again.") but this wasn't noticed because the helloworld test plugin has it's
own `PersistentPreRunE` which has the effect of deferring the resolution of the
global variable. In the case where the hook isn't used the variable is resolved
during `newPluginCommand` which is before the global variable was set.

Initialize the plugin command with a stub function wrapping the call to the
(global) hook, this defers resolving the variable until after it has been set,
otherwise the initial value (`nil`) is used in the struct.

Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit af200f14ed)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-05-13 09:06:08 -07:00
..
cli-plugins cli-plugins: fix when plugin does not use PersistentPreRun* hooks 2019-05-13 09:06:08 -07:00
container Add missing test 2018-11-26 14:02:16 +00:00
image Add option to pull images quietly 2018-12-19 13:48:41 +01:00
internal/fixtures Add missing test 2018-11-26 14:02:16 +00:00
plugin Fix: plugin-tests discarding current environment 2019-03-04 20:18:24 +01:00
stack Fix some typo 2018-09-07 17:18:00 +08:00
system Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
testdata e2e: avoid `usermod -p` by using `useradd`'s `--password` option 2019-03-11 14:25:41 +00:00
trust Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
compose-env.connhelper-ssh.yaml connhelper: add e2e 2018-09-30 10:24:34 +09:00
compose-env.experimental.yaml Make test-e2e run against experimental and non-experimental daemon 2018-06-25 11:46:35 +02:00
compose-env.yaml Add missing test 2018-11-26 14:02:16 +00:00