MCPcopy Index your code
hub / github.com/dagger/container-use / TestRepositoryContention

Function TestRepositoryContention

cmd/container-use/stdio_test.go:341–367  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

339}
340
341func TestRepositoryContention(t *testing.T) {
342 if testing.Short() {
343 t.Skip("Skipping E2E test")
344 }
345
346 const numServers = 10
347 sharedRepoDir, err := os.MkdirTemp("", "cu-e2e-shared-repo-*")
348 require.NoError(t, err)
349 defer os.RemoveAll(sharedRepoDir)
350
351 setupGitRepo(t, sharedRepoDir)
352
353 sharedConfigDir, err := os.MkdirTemp("", "cu-e2e-shared-config-*")
354 require.NoError(t, err)
355 defer os.RemoveAll(sharedConfigDir)
356
357 servers := make([]*MCPServerProcess, numServers)
358
359 for i := range numServers {
360 servers[i] = createMCPServerForRepositoryTest(t, i, sharedRepoDir, sharedConfigDir, false)
361 t.Cleanup(func() {
362 servers[i].Close()
363 })
364 }
365
366 runRepositoryContentionTest(t, servers, "Multi-Tenant")
367}
368
369func TestSingleTenantRepositoryContention(t *testing.T) {
370 if testing.Short() {

Callers

nothing calls this directly

Calls 4

setupGitRepoFunction · 0.85
CloseMethod · 0.80

Tested by

no test coverage detected