Use pause/resume device to ensure TestConflictsDefault can run

This commit is contained in:
Jakob Borg
2015-11-17 13:32:57 +01:00
parent 9cf653d673
commit 37f866b47f
2 changed files with 26 additions and 0 deletions

View File

@@ -281,6 +281,16 @@ func (p *Process) PostConfig(cfg config.Configuration) error {
return err
}
func (p *Process) PauseDevice(dev protocol.DeviceID) error {
_, err := p.Post("/rest/system/pause?device="+dev.String(), nil)
return err
}
func (p *Process) ResumeDevice(dev protocol.DeviceID) error {
_, err := p.Post("/rest/system/resume?device="+dev.String(), nil)
return err
}
func InSync(folder string, ps ...*Process) bool {
for _, p := range ps {
p.eventMut.Lock()