MCPcopy Create free account
hub / github.com/docker/docker-agent / TestCreateRejectsDuplicateName

Function TestCreateRejectsDuplicateName

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

Source from the content-addressed store, hash-verified

197}
198
199func TestCreateRejectsDuplicateName(t *testing.T) {
200 t.Parallel()
201 dir := bootstrapRepo(t)
202 root := t.TempDir()
203
204 _, err := Create(t.Context(), dir, "dup", WithRoot(root))
205 require.NoError(t, err)
206
207 _, err = Create(t.Context(), dir, "dup", WithRoot(root))
208 assert.ErrorIs(t, err, ErrInvalidName)
209}
210
211func TestStatusClean(t *testing.T) {
212 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