(ctx context.Context, factory app.DocsHTTPClientFactory)
| 164 | } |
| 165 | |
| 166 | func withDocsTestHTTPClientFactory(ctx context.Context, factory app.DocsHTTPClientFactory) context.Context { |
| 167 | if ctx == nil { |
| 168 | ctx = context.Background() |
| 169 | } |
| 170 | runtime := &app.Runtime{} |
| 171 | if existing, ok := app.FromContext(ctx); ok { |
| 172 | *runtime = *existing |
| 173 | } |
| 174 | runtime.Services.DocsHTTP = factory |
| 175 | return app.WithRuntime(ctx, runtime) |
| 176 | } |
| 177 | |
| 178 | func newDocsCmdContext(t *testing.T) context.Context { |
| 179 | t.Helper() |
no test coverage detected