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

refactor(worker): export worker's LoadConfig

这个提交包含在:
bigeagle
2016-04-28 19:37:29 +08:00
父节点 0dcd89da31
当前提交 f8151e689f
共有 2 个文件被更改,包括 5 次插入4 次删除

查看文件

@@ -54,7 +54,7 @@ exclude_file = "/etc/tunasync.d/fedora-exclude.txt"
`
Convey("When giving invalid file", t, func() {
cfg, err := loadConfig("/path/to/invalid/file")
cfg, err := LoadConfig("/path/to/invalid/file")
So(err, ShouldNotBeNil)
So(cfg, ShouldBeNil)
})
@@ -68,7 +68,7 @@ exclude_file = "/etc/tunasync.d/fedora-exclude.txt"
So(err, ShouldEqual, nil)
defer tmpfile.Close()
cfg, err := loadConfig(tmpfile.Name())
cfg, err := LoadConfig(tmpfile.Name())
So(err, ShouldBeNil)
So(cfg.Global.Name, ShouldEqual, "test_worker")
So(cfg.Global.Interval, ShouldEqual, 240)
@@ -107,7 +107,7 @@ exclude_file = "/etc/tunasync.d/fedora-exclude.txt"
So(err, ShouldEqual, nil)
defer tmpfile.Close()
cfg, err := loadConfig(tmpfile.Name())
cfg, err := LoadConfig(tmpfile.Name())
So(err, ShouldBeNil)
w := &Worker{