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

Function Test_configureServerTLS

cli/server_internal_test.go:22–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20)
21
22func Test_configureServerTLS(t *testing.T) {
23 t.Parallel()
24 t.Run("DefaultNoInsecureCiphers", func(t *testing.T) {
25 t.Parallel()
26 logger := testutil.Logger(t)
27 cfg, err := configureServerTLS(context.Background(), logger, "tls12", "none", nil, nil, "", nil, false)
28 require.NoError(t, err)
29
30 require.NotEmpty(t, cfg)
31
32 insecureCiphers := tls.InsecureCipherSuites()
33 for _, cipher := range cfg.CipherSuites {
34 for _, insecure := range insecureCiphers {
35 if cipher == insecure.ID {
36 t.Logf("Insecure cipher found by default: %s", insecure.Name)
37 t.Fail()
38 }
39 }
40 }
41 })
42}
43
44func Test_configureCipherSuites(t *testing.T) {
45 t.Parallel()

Callers

nothing calls this directly

Calls 6

LoggerFunction · 0.92
configureServerTLSFunction · 0.85
NotEmptyMethod · 0.80
RunMethod · 0.65
LogfMethod · 0.65
FailMethod · 0.45

Tested by

no test coverage detected