MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / ginCtx

Function ginCtx

sdk/api/handlers/injection_poison_test.go:38–43  ·  view source on GitHub ↗

ginCtx builds a minimal gin.Context with the sessionID stored.

(sessionID string)

Source from the content-addressed store, hash-verified

36
37// ginCtx builds a minimal gin.Context with the sessionID stored.
38func ginCtx(sessionID string) *gin.Context {
39 w := httptest.NewRecorder()
40 c, _ := gin.CreateTestContext(w)
41 c.Set("sessionID", sessionID)
42 return c
43}
44
45// handler returns a minimal BaseAPIHandler (no auth/config needed for observe paths).
46func handler() *BaseAPIHandler {

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected