Resolve the docker Endpoint even if the client already exists. In that case the TestDialStdio e2e test had to be modified: the --tls option triggers an error since the endpoint resolution tries to read the ${DOCKER_CERT_PATH}/ca.pem file which does not exist.
Signed-off-by: Jean-Christophe Sirot <jean-christophe.sirot@docker.com>
This commit is contained in:
@ -18,9 +18,9 @@ func TestDialStdio(t *testing.T) {
|
||||
// follows. We observe this from the debug level logging from
|
||||
// the connhelper stuff.
|
||||
helloworld := filepath.Join(os.Getenv("DOCKER_CLI_E2E_PLUGINS_EXTRA_DIRS"), "docker-helloworld")
|
||||
cmd := icmd.Command(helloworld, "--config=blah", "--tls", "--log-level", "debug", "helloworld", "--who=foo")
|
||||
cmd := icmd.Command(helloworld, "--config=blah", "--log-level", "debug", "helloworld", "--who=foo")
|
||||
res := icmd.RunCmd(cmd, icmd.WithEnv(manager.ReexecEnvvar+"=/bin/true"))
|
||||
res.Assert(t, icmd.Success)
|
||||
assert.Assert(t, is.Contains(res.Stderr(), `msg="commandconn: starting /bin/true with [--config=blah --tls --log-level debug system dial-stdio]"`))
|
||||
assert.Assert(t, is.Contains(res.Stderr(), `msg="commandconn: starting /bin/true with [--config=blah --log-level debug system dial-stdio]"`))
|
||||
assert.Assert(t, is.Equal(res.Stdout(), "Hello foo!\n"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user