MCPcopy Create free account
hub / github.com/aurora-develop/aurora / testContextWithHeaders

Function testContextWithHeaders

initialize/handlers_test.go:130–139  ·  view source on GitHub ↗
(headers map[string]string)

Source from the content-addressed store, hash-verified

128}
129
130func testContextWithHeaders(headers map[string]string) *gin.Context {
131 w := httptest.NewRecorder()
132 c, _ := gin.CreateTestContext(w)
133 req := httptest.NewRequest(http.MethodPost, "/", nil)
134 for key, value := range headers {
135 req.Header.Set(key, value)
136 }
137 c.Request = req
138 return c
139}
140
141func sseDataLines(output string) []string {
142 var lines []string

Callers 2

Calls 1

SetMethod · 0.80

Tested by

no test coverage detected