MCPcopy Index your code
hub / github.com/authorizerdev/authorizer / createContext

Function createContext

internal/integration_tests/test_helper.go:58–71  ·  view source on GitHub ↗
(s *testSetup)

Source from the content-addressed store, hash-verified

56}
57
58func createContext(s *testSetup) (*http.Request, context.Context) {
59 req, err := http.NewRequest(
60 http.MethodPost,
61 "http://"+s.HttpServer.Listener.Addr().String()+"/graphql",
62 nil,
63 )
64 if err != nil {
65 panic("integration_tests.createContext: " + err.Error())
66 }
67
68 ctx := utils.ContextWithGin(req.Context(), s.GinContext)
69 s.GinContext.Request = req
70 return req, ctx
71}
72
73// testAccessToken signs up a user via GraphQL and returns a bearer access token.
74func testAccessToken(t *testing.T, ts *testSetup) string {

Callers 15

TestResendOTPFunction · 0.85
TestUpdateWebhookTestFunction · 0.85
TestEnableAccessUserFunction · 0.85
TestAdminMetaFunction · 0.85
TestAddWebhookTestFunction · 0.85
setupIntrospectTestFunction · 0.85
TestLoginUnverifiedEmailFunction · 0.85
TestLoginFunction · 0.85
TestAdminAuditLogsFunction · 0.85

Calls 3

ContextWithGinFunction · 0.92
ErrorMethod · 0.80
StringMethod · 0.45

Tested by 15

TestResendOTPFunction · 0.68
TestUpdateWebhookTestFunction · 0.68
TestEnableAccessUserFunction · 0.68
TestAdminMetaFunction · 0.68
TestAddWebhookTestFunction · 0.68
setupIntrospectTestFunction · 0.68
TestLoginUnverifiedEmailFunction · 0.68
TestLoginFunction · 0.68
TestAdminAuditLogsFunction · 0.68