MCPcopy Create free account
hub / github.com/containers/image / TestSkipTLSVerifyOnly

Function TestSkipTLSVerifyOnly

docker/daemon/client_test.go:71–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69}
70
71func TestSkipTLSVerifyOnly(t *testing.T) {
72 //testDir := testDir(t)
73
74 ctx := &types.SystemContext{
75 DockerDaemonInsecureSkipTLSVerify: true,
76 }
77
78 httpClient, err := tlsConfig(ctx)
79
80 assert.NoError(t, err, "There should be no error creating the HTTP client")
81
82 tlsConfig := httpClient.Transport.(*http.Transport).TLSClientConfig
83 assert.True(t, tlsConfig.InsecureSkipVerify, "TLS verification should be skipped")
84 assert.Len(t, tlsConfig.Certificates, 0, "There should be no certificate")
85}
86
87func TestSpecifyPlainHTTPViaHostScheme(t *testing.T) {
88 host := "http://127.0.0.1:2376"

Callers

nothing calls this directly

Calls 1

tlsConfigFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…