MCPcopy Create free account
hub / github.com/BryanMwangi/pine / TestNewServer_TLSConfig

Function TestNewServer_TLSConfig

pine_test.go:112–123  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

110}
111
112func TestNewServer_TLSConfig(t *testing.T) {
113 customTLSConfig := Config{
114 TLSConfig: TLSConfig{ServeTLS: true},
115 }
116
117 server := New(customTLSConfig)
118
119 // Assert that the TLS configuration is set correctly
120 if !server.config.TLSConfig.ServeTLS {
121 t.Error("expected ServeTLS to be true")
122 }
123}
124
125func TestAddRoute_ValidMethod(t *testing.T) {
126 server := New()

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected