MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / generateDocs

Function generateDocs

cli/cmd/doc_test.go:39–46  ·  view source on GitHub ↗

generateDocs runs the doc command into a temp directory and returns the path. Shared by multiple tests so we only generate once per test run.

(t *testing.T)

Source from the content-addressed store, hash-verified

37// generateDocs runs the doc command into a temp directory and returns the path.
38// Shared by multiple tests so we only generate once per test run.
39func generateDocs(t *testing.T) string {
40 t.Helper()
41 tmpDir := t.TempDir()
42 cmd := NewCmdRoot()
43 cmd.SetArgs(append([]string{"doc", tmpDir}, testCommandArgs(t)...))
44 require.NoError(t, cmd.Execute())
45 return tmpDir
46}
47
48func TestDoc(t *testing.T) {
49 tmpDir := generateDocs(t)

Callers 2

TestDocFunction · 0.85
TestDocHeadingStructureFunction · 0.85

Calls 2

testCommandArgsFunction · 0.85
NewCmdRootFunction · 0.70

Tested by

no test coverage detected