MCPcopy Index your code
hub / github.com/google/go-github / runTest

Function runTest

tools/metadata/main_test.go:315–333  ·  view source on GitHub ↗
(t *testing.T, srcDir string, args ...string)

Source from the content-addressed store, hash-verified

313}
314
315func runTest(t *testing.T, srcDir string, args ...string) testRun {
316 t.Helper()
317 srcDir = filepath.FromSlash(srcDir)
318 res := testRun{
319 t: t,
320 workDir: t.TempDir(),
321 srcDir: srcDir,
322 }
323 err := copyDir(t, res.workDir, srcDir)
324 if err != nil {
325 t.Error(err)
326 return res
327 }
328 res.err = run(
329 append(args, "-C", res.workDir),
330 []kong.Option{kong.Writers(&res.stdOut, &res.stdErr)},
331 )
332 return res
333}
334
335func newTestServer(t *testing.T, ref string, files map[string]any) *httptest.Server {
336 t.Helper()

Callers 4

TestUpdateGoFunction · 0.85
TestUnusedFunction · 0.85
TestUpdateOpenAPIFunction · 0.85
TestFormatFunction · 0.85

Calls 3

copyDirFunction · 0.85
runFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…