aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzehweh <cw@tf2.net>2023-11-21 14:05:35 +0100
committerChris Lu <chrislusf@users.noreply.github.com>2023-11-21 08:24:34 -0800
commitd818ca963178a11748aa6267136ad2d6eb1de5e5 (patch)
treecc3f8f686afbe1f7dff829080bf56de629868a00
parentf4cafc1dbc75df986334bf5a8b4a9e79853bf654 (diff)
downloadseaweedfs-d818ca963178a11748aa6267136ad2d6eb1de5e5.tar.xz
seaweedfs-d818ca963178a11748aa6267136ad2d6eb1de5e5.zip
fix TestMisplacedChecking() and add test-case
-rw-r--r--weed/shell/command_volume_fix_replication_test.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/weed/shell/command_volume_fix_replication_test.go b/weed/shell/command_volume_fix_replication_test.go
index 89ab9f0c1..97f270306 100644
--- a/weed/shell/command_volume_fix_replication_test.go
+++ b/weed/shell/command_volume_fix_replication_test.go
@@ -332,7 +332,10 @@ func TestMisplacedChecking(t *testing.T) {
location: &location{"dc1", "r1", &master_pb.DataNodeInfo{Id: "dn1"}},
},
{
- location: &location{"dc1", "r2", &master_pb.DataNodeInfo{Id: "dn2"}},
+ location: &location{"dc1", "r1", &master_pb.DataNodeInfo{Id: "dn2"}},
+ },
+ {
+ location: &location{"dc1", "r2", &master_pb.DataNodeInfo{Id: "dn3"}},
},
},
expected: false,
@@ -345,10 +348,13 @@ func TestMisplacedChecking(t *testing.T) {
location: &location{"dc1", "r1", &master_pb.DataNodeInfo{Id: "dn1"}},
},
{
- location: &location{"dc1", "r2", &master_pb.DataNodeInfo{Id: "dn2"}},
+ location: &location{"dc1", "r1", &master_pb.DataNodeInfo{Id: "dn2"}},
+ },
+ {
+ location: &location{"dc2", "r2", &master_pb.DataNodeInfo{Id: "dn3"}},
},
},
- expected: false,
+ expected: true,
},
{
name: "test 100",