MCPcopy Index your code
hub / github.com/coder/coder / TestNewIsolatedHTTPSClient

Function TestNewIsolatedHTTPSClient

coderd/coderdtest/httpclient_test.go:28–39  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26}
27
28func TestNewIsolatedHTTPSClient(t *testing.T) {
29 t.Parallel()
30
31 client := coderdtest.NewIsolatedHTTPClient(testutil.MustURL(t, "https://example.com"))
32 require.NotSame(t, http.DefaultTransport, client.Transport)
33
34 transport, ok := client.Transport.(*http.Transport)
35 require.True(t, ok)
36 require.NotNil(t, transport.TLSClientConfig)
37 require.True(t, transport.TLSClientConfig.InsecureSkipVerify)
38 require.Equal(t, uint16(tls.VersionTLS12), transport.TLSClientConfig.MinVersion)
39}
40
41func TestNewIsolatedHTTPClientNilURL(t *testing.T) {
42 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewIsolatedHTTPClientFunction · 0.92
MustURLFunction · 0.92
EqualMethod · 0.45

Tested by

no test coverage detected