MCPcopy Index your code
hub / github.com/go-dev-frame/sponge / TestServer_Run_WithTLSer

Function TestServer_Run_WithTLSer

pkg/httpsrv/http_test.go:76–93  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

74}
75
76func TestServer_Run_WithTLSer(t *testing.T) {
77 mockTLS := &mockTLSer{}
78 server := &http.Server{
79 Addr: "localhost:0",
80 }
81
82 srv := New(server, mockTLS)
83
84 // This should use the mock TLSer
85 err := srv.validate()
86 if err != nil {
87 t.Errorf("validate() with TLSer error = %v", err)
88 }
89
90 if srv.Scheme() != "https" {
91 t.Errorf("Scheme() error = %v, want https", srv.Scheme())
92 }
93}
94
95func TestServer_Shutdown(t *testing.T) {
96 tests := []struct {

Callers

nothing calls this directly

Calls 4

ErrorfMethod · 0.80
NewFunction · 0.70
validateMethod · 0.45
SchemeMethod · 0.45

Tested by

no test coverage detected