aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_balance_test.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2020-11-22 20:29:17 +0800
committerGitHub <noreply@github.com>2020-11-22 20:29:17 +0800
commit9aa990f80f8af70628c72eaf0c20d445c15b9e9d (patch)
tree2dd4ed5551515b207074bf27908432b0293cd321 /weed/shell/command_volume_balance_test.go
parente8296104fc715f0f7c41a82059f366603b3e94f0 (diff)
parent92f906b6fcce2ef72661bb825075e2826b8f3aa1 (diff)
downloadseaweedfs-9aa990f80f8af70628c72eaf0c20d445c15b9e9d.tar.xz
seaweedfs-9aa990f80f8af70628c72eaf0c20d445c15b9e9d.zip
Merge pull request #39 from chrislusf/master
sync
Diffstat (limited to 'weed/shell/command_volume_balance_test.go')
-rw-r--r--weed/shell/command_volume_balance_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/weed/shell/command_volume_balance_test.go b/weed/shell/command_volume_balance_test.go
index 9e154dc00..696bc7fac 100644
--- a/weed/shell/command_volume_balance_test.go
+++ b/weed/shell/command_volume_balance_test.go
@@ -21,6 +21,22 @@ func TestIsGoodMove(t *testing.T) {
var tests = []testMoveCase{
{
+ name: "test 100 move to wrong data centers",
+ replication: "100",
+ replicas: []*VolumeReplica{
+ {
+ location: &location{"dc1", "r1", &master_pb.DataNodeInfo{Id: "dn1"}},
+ },
+ {
+ location: &location{"dc2", "r2", &master_pb.DataNodeInfo{Id: "dn2"}},
+ },
+ },
+ sourceLocation: location{"dc1", "r1", &master_pb.DataNodeInfo{Id: "dn1"}},
+ targetLocation: location{"dc2", "r3", &master_pb.DataNodeInfo{Id: "dn3"}},
+ expected: false,
+ },
+
+ {
name: "test 100 move to spread into proper data centers",
replication: "100",
replicas: []*VolumeReplica{