MCPcopy Index your code
hub / github.com/rilldata/rill / TestInferGitRepoRoot_InNestedDir

Function TestInferGitRepoRoot_InNestedDir

cli/pkg/gitutil/gitcmdwrapper_test.go:318–328  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

316}
317
318func TestInferGitRepoRoot_InNestedDir(t *testing.T) {
319 tempDir, _ := setupTestRepository(t)
320
321 nested := filepath.Join(tempDir, "nested", "deep")
322 err := os.MkdirAll(nested, 0o755)
323 require.NoError(t, err, "failed to create nested directories")
324
325 root, err := InferGitRepoRoot(nested)
326 require.NoError(t, err, "InferGitRepoRoot failed on nested path")
327 assertPathsEqual(t, root, tempDir)
328}
329
330func TestInferGitRepoRoot_NotRepo(t *testing.T) {
331 dir := t.TempDir()

Callers

nothing calls this directly

Calls 4

InferGitRepoRootFunction · 0.85
assertPathsEqualFunction · 0.85
setupTestRepositoryFunction · 0.70
MkdirAllMethod · 0.65

Tested by

no test coverage detected