mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
test, lib/rc: Integration test fixes and polish (#5488)
This commit is contained in:
parent
8815ef922b
commit
657be162dd
@ -126,12 +126,10 @@ func (p *Process) wait() {
|
||||
// AwaitStartup waits for the Syncthing process to start and perform initial
|
||||
// scans of all folders.
|
||||
func (p *Process) AwaitStartup() {
|
||||
fmt.Println("awaiting startup")
|
||||
select {
|
||||
case <-p.startComplete:
|
||||
case <-p.stopped:
|
||||
}
|
||||
fmt.Println("awaited startup")
|
||||
}
|
||||
|
||||
// Stop stops the running Syncthing process. If the process was logging to a
|
||||
@ -320,6 +318,7 @@ func InSync(folder string, ps ...*Process) bool {
|
||||
// If our latest FolderSummary didn't report 100%, then we are not done.
|
||||
|
||||
if !ps[i].done[folder] {
|
||||
l.Debugf("done = ps[%d].done[%q] = false", i, folder)
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -28,8 +28,8 @@ func TestOverride(t *testing.T) {
|
||||
fld := cfg.Folders()["default"]
|
||||
fld.Type = config.FolderTypeSendOnly
|
||||
cfg.SetFolder(fld)
|
||||
t.Log(os.Rename("h1/config.xml", "h1/config.xml.orig"))
|
||||
defer t.Log(os.Rename("h1/config.xml.orig", "h1/config.xml"))
|
||||
os.Rename("h1/config.xml", "h1/config.xml.orig")
|
||||
defer os.Rename("h1/config.xml.orig", "h1/config.xml")
|
||||
cfg.Save()
|
||||
|
||||
log.Println("Cleaning...")
|
||||
|
Loading…
Reference in New Issue
Block a user