MCPcopy Index your code
hub / github.com/docker/docker-agent / TestCreateFromSubfolder

Function TestCreateFromSubfolder

pkg/worktree/worktree_test.go:158–168  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

156}
157
158func TestCreateFromSubfolder(t *testing.T) {
159 t.Parallel()
160 repoRoot := bootstrapRepo(t)
161 sub := filepath.Join(repoRoot, "nested")
162 require.NoError(t, os.MkdirAll(sub, 0o755))
163
164 wt, err := Create(t.Context(), sub, "", WithRoot(t.TempDir()))
165 require.NoError(t, err)
166 assert.DirExists(t, wt.Dir)
167 assert.FileExists(t, filepath.Join(wt.Dir, "a.txt"))
168}
169
170func TestCreateOutsideGitRepo(t *testing.T) {
171 t.Parallel()

Callers

nothing calls this directly

Calls 4

CreateFunction · 0.85
WithRootFunction · 0.85
ContextMethod · 0.80
bootstrapRepoFunction · 0.70

Tested by

no test coverage detected