ginCtx builds a minimal gin.Context with the sessionID stored.
(sessionID string)
| 36 | |
| 37 | // ginCtx builds a minimal gin.Context with the sessionID stored. |
| 38 | func 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). |
| 46 | func handler() *BaseAPIHandler { |
no test coverage detected