fix: failed UT
This commit is contained in:
parent
560097145b
commit
56fa01ed61
2 changed files with 2 additions and 13 deletions
|
@ -36,7 +36,7 @@ func TestHandler_Put(t *testing.T) {
|
|||
{&fsctx.FileStream{
|
||||
SavePath: "TestHandler_Put.txt",
|
||||
File: io.NopCloser(strings.NewReader("")),
|
||||
}, "物理同名文件已存在或不可用"},
|
||||
}, "file with the same name existed or unavailable"},
|
||||
{&fsctx.FileStream{
|
||||
SavePath: "inner/TestHandler_Put.txt",
|
||||
File: io.NopCloser(strings.NewReader("")),
|
||||
|
@ -51,7 +51,7 @@ func TestHandler_Put(t *testing.T) {
|
|||
Mode: fsctx.Append | fsctx.Overwrite,
|
||||
SavePath: "inner/TestHandler_Put.txt",
|
||||
File: io.NopCloser(strings.NewReader("123")),
|
||||
}, "未上传完成的文件分片与预期大小不一致"},
|
||||
}, "size of unfinished uploaded chunks is not as expected"},
|
||||
{&fsctx.FileStream{
|
||||
Mode: fsctx.Append | fsctx.Overwrite,
|
||||
SavePath: "inner/TestHandler_Put.txt",
|
||||
|
|
|
@ -19,14 +19,3 @@ func TestSlaveTransferReq_Hash(t *testing.T) {
|
|||
}
|
||||
a.NotEqual(s1.Hash("1"), s2.Hash("1"))
|
||||
}
|
||||
|
||||
func TestSlaveRecycleReq_Hash(t *testing.T) {
|
||||
a := assert.New(t)
|
||||
s1 := &SlaveRecycleReq{
|
||||
Path: "1",
|
||||
}
|
||||
s2 := &SlaveRecycleReq{
|
||||
Path: "2",
|
||||
}
|
||||
a.NotEqual(s1.Hash("1"), s2.Hash("1"))
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue