Use TLS for tests if needed

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 0bdba0e91a072ee2cdecb4e632c13f187eb88e9c
Component: engine
This commit is contained in:
Christopher Crone
2017-09-14 19:27:09 +02:00
parent e3234a8303
commit 2801aaa58e
8 changed files with 22 additions and 17 deletions
@@ -1,11 +1,9 @@
package main
import (
"net/http"
"strings"
"time"
"github.com/docker/docker/client"
"github.com/docker/docker/integration-cli/checker"
"github.com/docker/docker/integration-cli/cli"
"github.com/go-check/check"
@@ -131,8 +129,7 @@ func (s *DockerSuite) TestKillStoppedContainerAPIPre120(c *check.C) {
testRequires(c, DaemonIsLinux) // Windows only supports 1.25 or later
runSleepingContainer(c, "--name", "docker-kill-test-api", "-d")
dockerCmd(c, "stop", "docker-kill-test-api")
var httpClient *http.Client
cli, err := client.NewClient(daemonHost(), "v1.19", httpClient, nil)
cli, err := NewEnvClientWithVersion("v1.19")
c.Assert(err, check.IsNil)
defer cli.Close()
err = cli.ContainerKill(context.Background(), "docker-kill-test-api", "SIGKILL")