MCPcopy
hub / github.com/dagger/container-use / TestRepositoryCreate

Function TestRepositoryCreate

environment/integration/repository_test.go:16–33  ·  view source on GitHub ↗

TestRepositoryCreate tests creating a new environment

(t *testing.T)

Source from the content-addressed store, hash-verified

14
15// TestRepositoryCreate tests creating a new environment
16func TestRepositoryCreate(t *testing.T) {
17 t.Parallel()
18 WithRepository(t, "repository-create", SetupEmptyRepo, func(t *testing.T, repo *repository.Repository, user *UserActions) {
19 // Create an environment
20 env := user.CreateEnvironment("Test Create", "Testing repository create")
21
22 // Verify environment was created properly
23 assert.NotNil(t, env)
24 assert.NotEmpty(t, env.ID)
25 assert.Equal(t, "Test Create", env.State.Title)
26 worktreePath := user.WorktreePath(env.ID)
27 assert.NotEmpty(t, worktreePath)
28
29 // Verify worktree was created
30 _, err := os.Stat(worktreePath)
31 assert.NoError(t, err)
32 })
33}
34
35// TestRepositoryGet tests retrieving an existing environment
36func TestRepositoryGet(t *testing.T) {

Callers

nothing calls this directly

Calls 3

WithRepositoryFunction · 0.85
CreateEnvironmentMethod · 0.45
WorktreePathMethod · 0.45

Tested by

no test coverage detected