镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-06 06:26:46 +00:00
feature(worker): runMirrorJob no longer controls the interval
这个提交包含在:
@@ -9,10 +9,13 @@ import (
|
||||
"time"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
. "github.com/tuna/tunasync/internal"
|
||||
)
|
||||
|
||||
func TestMirrorJob(t *testing.T) {
|
||||
|
||||
InitLogger(true, true, false)
|
||||
|
||||
Convey("MirrorJob should work", t, func(ctx C) {
|
||||
tmpDir, err := ioutil.TempDir("", "tunasync")
|
||||
defer os.RemoveAll(tmpDir)
|
||||
@@ -71,6 +74,7 @@ func TestMirrorJob(t *testing.T) {
|
||||
loggedContent, err := ioutil.ReadFile(provider.LogFile())
|
||||
So(err, ShouldBeNil)
|
||||
So(string(loggedContent), ShouldEqual, exceptedOutput)
|
||||
ctrlChan <- jobStart
|
||||
}
|
||||
select {
|
||||
case <-managerChan:
|
||||
@@ -107,7 +111,7 @@ echo $TUNASYNC_WORKING_DIR
|
||||
go runMirrorJob(provider, ctrlChan, managerChan, semaphore)
|
||||
time.Sleep(1 * time.Second)
|
||||
ctrlChan <- jobStop
|
||||
time.Sleep(1 * time.Second)
|
||||
<-managerChan
|
||||
exceptedOutput := fmt.Sprintf("%s\n", provider.WorkingDir())
|
||||
loggedContent, err := ioutil.ReadFile(provider.LogFile())
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
在新工单中引用
屏蔽一个用户