MCPcopy Create free account
hub / github.com/openclaw/gogcli / withDocsTestHTTPClientFactory

Function withDocsTestHTTPClientFactory

internal/cmd/docs_testutil_test.go:166–176  ·  view source on GitHub ↗
(ctx context.Context, factory app.DocsHTTPClientFactory)

Source from the content-addressed store, hash-verified

164}
165
166func 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
178func newDocsCmdContext(t *testing.T) context.Context {
179 t.Helper()

Callers 3

newTabExportTestContextFunction · 0.85
withDocsBatchHTTPTestFunction · 0.85

Calls 2

FromContextFunction · 0.92
WithRuntimeFunction · 0.92

Tested by

no test coverage detected