Merge pull request #1773 from Zillode/fix-browser

Do not launch browser when running integration tests
This commit is contained in:
Jakob Borg 2015-05-07 22:23:47 +02:00
commit 2493ae4c2c
2 changed files with 5 additions and 4 deletions

View File

@ -31,7 +31,7 @@ func TestCLIReset(t *testing.T) {
// Run reset to clean up
cmd := exec.Command("../bin/syncthing", "-home", "h1", "-reset")
cmd := exec.Command("../bin/syncthing", "-no-browser", "-home", "h1", "-reset")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stdout
err := cmd.Run()
@ -65,7 +65,7 @@ func TestCLIGenerate(t *testing.T) {
// -generate should create a bunch of stuff
cmd := exec.Command("../bin/syncthing", "-generate", "home.out")
cmd := exec.Command("../bin/syncthing", "-no-browser", "-generate", "home.out")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stdout
err = cmd.Run()
@ -91,7 +91,7 @@ func TestCLIFirstStartup(t *testing.T) {
// First startup should create config, BEP certificate, and HTTP certificate.
cmd := exec.Command("../bin/syncthing", "-home", "home.out")
cmd := exec.Command("../bin/syncthing", "-no-browser", "-home", "home.out")
cmd.Env = append(os.Environ(), "STNORESTART=1")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stdout

View File

@ -66,7 +66,8 @@ func (p *syncthingProcess) start() error {
binary = binary + "-" + p.instance + ".exe"
}
cmd := exec.Command(binary, p.argv...)
argv := append(p.argv, "-no-browser")
cmd := exec.Command(binary, argv...)
cmd.Stdout = p.logfd
cmd.Stderr = p.logfd
cmd.Env = append(os.Environ(), env...)