(c *testing.T)
| 2360 | } |
| 2361 | |
| 2362 | func (s *DockerCLIRunSuite) TestRunTLSVerify(c *testing.T) { |
| 2363 | // Remote daemons use TLS and this test is not applicable when TLS is required. |
| 2364 | testRequires(c, testEnv.IsLocalDaemon) |
| 2365 | if out, code, err := dockerCmdWithError("version"); err != nil || code != 0 { |
| 2366 | c.Fatalf("Should have worked: %v:\n%v", err, out) |
| 2367 | } |
| 2368 | |
| 2369 | var notFoundErr string |
| 2370 | if runtime.GOOS == "windows" { |
| 2371 | notFoundErr = "ca.pem: The system cannot find the file specified" |
| 2372 | } else { |
| 2373 | notFoundErr = "ca.pem: no such file or directory" |
| 2374 | } |
| 2375 | |
| 2376 | // Regardless of whether we specify true or false we need to |
| 2377 | // test to make sure tls is turned on if --tlsverify is specified at all |
| 2378 | result := cli.Docker(cli.Args("--tlsverify=false", "version")) |
| 2379 | result.Assert(c, icmd.Expected{ExitCode: 1, Err: notFoundErr}) |
| 2380 | |
| 2381 | result = cli.Docker(cli.Args("--tlsverify=true", "version")) |
| 2382 | result.Assert(c, icmd.Expected{ExitCode: 1, Err: notFoundErr}) |
| 2383 | } |
| 2384 | |
| 2385 | func (s *DockerCLIRunSuite) TestRunPortFromDockerRangeInUse(c *testing.T) { |
| 2386 | // TODO Windows. Once moved to libnetwork/CNM, this may be able to be |
nothing calls this directly
no test coverage detected