(t *testing.T, ctx context.Context, server *httptest.Server)
| 492 | } |
| 493 | |
| 494 | func withDocsBatchHTTPTest(t *testing.T, ctx context.Context, server *httptest.Server) context.Context { |
| 495 | t.Helper() |
| 496 | oldBaseURL := docsBatchBaseURL |
| 497 | docsBatchBaseURL = server.URL |
| 498 | t.Cleanup(func() { |
| 499 | docsBatchBaseURL = oldBaseURL |
| 500 | }) |
| 501 | return withDocsTestHTTPClientFactory(ctx, func(context.Context, string) (*http.Client, error) { |
| 502 | return server.Client(), nil |
| 503 | }) |
| 504 | } |
| 505 | |
| 506 | func batchTestContext(t *testing.T) context.Context { |
| 507 | t.Helper() |
no test coverage detected