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

refactor: moved mirrorStatus back to manager

这个提交包含在:
bigeagle
2016-04-21 20:03:07 +08:00
父节点 96f38363ea
当前提交 ed69dde18e
共有 4 个文件被更改,包括 102 次插入65 次删除

23
internal/status_test.go 普通文件
查看文件

@@ -0,0 +1,23 @@
package internal
import (
"encoding/json"
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestSyncStatus(t *testing.T) {
Convey("SyncStatus json ser-de should work", t, func() {
b, err := json.Marshal(PreSyncing)
So(err, ShouldBeNil)
So(b, ShouldResemble, []byte(`"pre-syncing"`)) // deep equal should be used
var s SyncStatus
err = json.Unmarshal([]byte(`"failed"`), &s)
So(err, ShouldBeNil)
So(s, ShouldEqual, Failed)
})
}