1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-07 06:56:47 +00:00

tests(worker): added test for initProfile

这个提交包含在:
bigeagle
2016-04-28 11:14:18 +08:00
父节点 8b56fda1e9
当前提交 23c3125cbf
共有 2 个文件被更改,包括 58 次插入0 次删除

查看文件

@@ -68,6 +68,24 @@ func initProviders(c *Config) []mirrorProvider {
panic(err)
}
providers = append(providers, p)
case ProvTwoStageRsync:
rc := twoStageRsyncConfig{
name: mirror.Name,
stage1Profile: mirror.Stage1Profile,
upstreamURL: mirror.Upstream,
password: mirror.Password,
excludeFile: mirror.ExcludeFile,
workingDir: filepath.Join(mirrorDir, mirror.Name),
logDir: logDir,
logFile: filepath.Join(logDir, "latest.log"),
useIPv6: mirror.UseIPv6,
interval: time.Duration(mirror.Interval) * time.Minute,
}
p, err := newTwoStageRsyncProvider(rc)
if err != nil {
panic(err)
}
providers = append(providers, p)
default:
panic(errors.New("Invalid mirror provider"))