add tests

This commit is contained in:
Niko Storni 2018-04-25 17:05:26 -04:00
parent 6e3a34f0e0
commit 94acc180c2

26
ytsync_test.go Normal file
View file

@ -0,0 +1,26 @@
package ytsync
import (
"testing"
)
func TestWaitForDaemonProcess(t *testing.T) {
/*
err := startDaemonViaSystemd()
if err != nil {
t.Fail()
}
log.Infoln("Waiting 5 seconds for the daemon to start...")
time.Sleep(5 * time.Second)
err = stopDaemonViaSystemd()
if err != nil {
t.Fail()
}
*/
//start lbrynet before running this test
// stop lbrynet while running this test
err := waitForDaemonProcess(100)
if err != nil {
t.Fail()
}
}