MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / newTestResponse

Function newTestResponse

workers/webhook/pkg/webhook/mocks_test.go:92–109  ·  view source on GitHub ↗
(status int, body string)

Source from the content-addressed store, hash-verified

90}
91
92func newTestResponse(status int, body string) *http.Response {
93 return &http.Response{
94 StatusCode: status,
95 Status: http.StatusText(status),
96 Proto: "HTTP/1.1",
97 ProtoMajor: 1,
98 ProtoMinor: 1,
99 Header: make(http.Header),
100 Body: io.NopCloser(strings.NewReader(body)),
101 ContentLength: int64(len(body)),
102 TransferEncoding: []string{},
103 Close: false,
104 Uncompressed: false,
105 Trailer: make(http.Header),
106 Request: nil,
107 TLS: nil,
108 }
109}
110
111func testGeneratedAt() time.Time {
112 return time.Date(2026, 3, 12, 0, 0, 0, 0, time.UTC)

Calls

no outgoing calls

Tested by

no test coverage detected