MCPcopy
hub / github.com/syncthing/syncthing / startInstance

Function startInstance

test/util.go:526–539  ·  view source on GitHub ↗
(t *testing.T, i int)

Source from the content-addressed store, hash-verified

524}
525
526func startInstance(t *testing.T, i int) *rc.Process {
527 log.Printf("Starting instance %d...", i)
528 addr := fmt.Sprintf("127.0.0.1:%d", 8080+i)
529 log := fmt.Sprintf("logs/%s-%d-%d.out", getTestName(), i, time.Now().Unix()%86400)
530
531 p := rc.NewProcess(addr)
532 p.LogTo(log)
533 if err := p.Start("../bin/syncthing", "--home", fmt.Sprintf("h%d", i), "--no-browser"); err != nil {
534 t.Fatal(err)
535 }
536 p.AwaitStartup()
537 p.PauseAll()
538 return p
539}
540
541func symlinksSupported() bool {
542 tmp, err := os.MkdirTemp("", "symlink-test")

Callers 15

testSymlinksFunction · 0.85
TestRescanWithDelayFunction · 0.85
testFileTypeChangeFunction · 0.85
benchmarkTransferFunction · 0.85
TestScanSubdirFunction · 0.85
TestResetFunction · 0.85
TestConflictsDefaultFunction · 0.85
TestConflictsIndexResetFunction · 0.85
TestConflictsSameContentFunction · 0.85
TestManyPeersFunction · 0.85

Calls 8

LogToMethod · 0.95
StartMethod · 0.95
AwaitStartupMethod · 0.95
PauseAllMethod · 0.95
NewProcessFunction · 0.92
getTestNameFunction · 0.85
FatalMethod · 0.80
NowMethod · 0.65

Tested by 15

testSymlinksFunction · 0.68
TestRescanWithDelayFunction · 0.68
testFileTypeChangeFunction · 0.68
benchmarkTransferFunction · 0.68
TestScanSubdirFunction · 0.68
TestResetFunction · 0.68
TestConflictsDefaultFunction · 0.68
TestConflictsIndexResetFunction · 0.68
TestConflictsSameContentFunction · 0.68
TestManyPeersFunction · 0.68