Refactored integration tests

Added internal/rc to remote control a Syncthing process and made the
"awaiting sync" determination reliable.
This commit is contained in:
Jakob Borg
2015-06-18 15:22:45 +02:00
parent 69af77a3bd
commit c3d07d60ca
19 changed files with 868 additions and 1142 deletions

View File

@@ -454,8 +454,6 @@ func syncthingMain() {
runtime.GOMAXPROCS(runtime.NumCPU())
}
events.Default.Log(events.Starting, map[string]string{"home": baseDirs["config"]})
// Ensure that that we have a certificate and key.
cert, err := tls.LoadX509KeyPair(locations[locCertFile], locations[locKeyFile])
if err != nil {
@@ -475,6 +473,13 @@ func syncthingMain() {
l.Infoln(LongVersion)
l.Infoln("My ID:", myID)
// Emit the Starting event, now that we know who we are.
events.Default.Log(events.Starting, map[string]string{
"home": baseDirs["config"],
"myID": myID.String(),
})
// Prepare to be able to save configuration
cfgFile := locations[locConfigFile]