MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / findWebhookRequests

Function findWebhookRequests

tests/helpers_test.go:238–253  ·  view source on GitHub ↗
(t *testing.T, webhookPath string)

Source from the content-addressed store, hash-verified

236}
237
238func findWebhookRequests(t *testing.T, webhookPath string) []wmJournal.GetRequestResponse {
239 t.Helper()
240 wm := newWireMockClient()
241
242 allReqs, err := wm.GetAllRequests()
243 require.NoError(t, err)
244
245 var matched []wmJournal.GetRequestResponse
246 for _, req := range allReqs.Requests {
247 if strings.Contains(req.Request.URL, webhookPath) || strings.Contains(req.Request.AbsoluteURL, webhookPath) {
248 matched = append(matched, req)
249 }
250 }
251
252 return matched
253}
254
255func assertWebhookJWT(t *testing.T, request wmJournal.Request, signingKey string) {
256 t.Helper()

Callers 1

waitForWebhookEventsFunction · 0.85

Calls 1

newWireMockClientFunction · 0.85

Tested by

no test coverage detected