Browse Source

fix TestMisplacedChecking() and add test-case

pull/5048/head
zehweh 1 year ago
committed by Chris Lu
parent
commit
d818ca9631
  1. 12
      weed/shell/command_volume_fix_replication_test.go

12
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",

Loading…
Cancel
Save