1
0
mirror of https://github.com/docker/cli.git synced 2026-01-16 20:22:36 +03:00

Add a test to make sure that --tlsverify=false turn on tls in daemon

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 5ced3ab3236bfe8ade1b5b6663599518086af7da
Component: engine
This commit is contained in:
Doug Davis
2015-07-30 18:38:02 -07:00
parent 0a94a03fa6
commit 1d4ee6ca42

View File

@@ -1318,6 +1318,14 @@ func (s *DockerDaemonSuite) TestHttpsInfo(c *check.C) {
}
}
// TestTlsVerify verifies that --tlsverify=false turns on tls
func (s *DockerDaemonSuite) TestTlsVerify(c *check.C) {
out, err := exec.Command(dockerBinary, "daemon", "--tlsverify=false").CombinedOutput()
if err == nil || !strings.Contains(string(out), "Could not load X509 key pair") {
c.Fatalf("Daemon should not have started due to missing certs: %v\n%s", err, string(out))
}
}
// TestHttpsInfoRogueCert connects via two-way authenticated HTTPS to the info endpoint
// by using a rogue client certificate and checks that it fails with the expected error.
func (s *DockerDaemonSuite) TestHttpsInfoRogueCert(c *check.C) {