From 56fa01ed613147c320ed57e8e171a55e0e798575 Mon Sep 17 00:00:00 2001 From: HFO4 <912394456@qq.com> Date: Sat, 15 Oct 2022 09:55:44 +0800 Subject: [PATCH] fix: failed UT --- pkg/filesystem/driver/local/handler_test.go | 4 ++-- pkg/serializer/slave_test.go | 11 ----------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/pkg/filesystem/driver/local/handler_test.go b/pkg/filesystem/driver/local/handler_test.go index 9167e82..0dfe818 100644 --- a/pkg/filesystem/driver/local/handler_test.go +++ b/pkg/filesystem/driver/local/handler_test.go @@ -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", diff --git a/pkg/serializer/slave_test.go b/pkg/serializer/slave_test.go index add3a63..46b5d2d 100644 --- a/pkg/serializer/slave_test.go +++ b/pkg/serializer/slave_test.go @@ -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")) -}