(t *testing.T)
| 74 | } |
| 75 | |
| 76 | func 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 | |
| 95 | func TestServer_Shutdown(t *testing.T) { |
| 96 | tests := []struct { |