aboutsummaryrefslogtreecommitdiff
path: root/weed/shell
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell')
-rw-r--r--weed/shell/command_volume_fix_replication.go2
-rw-r--r--weed/shell/command_volume_fix_replication_test.go1
2 files changed, 2 insertions, 1 deletions
diff --git a/weed/shell/command_volume_fix_replication.go b/weed/shell/command_volume_fix_replication.go
index 4e1a6078b..5bfe1edc9 100644
--- a/weed/shell/command_volume_fix_replication.go
+++ b/weed/shell/command_volume_fix_replication.go
@@ -213,7 +213,7 @@ func satisfyReplicaPlacement(replicaPlacement *super_block.ReplicaPlacement, exi
// now this is one of the primary dcs
existingRacks := make(map[string]int)
for _, loc := range existingLocations {
- if loc.DataCenter()!=possibleLocation.DataCenter() {
+ if loc.DataCenter() != possibleLocation.DataCenter() {
continue
}
existingRacks[loc.Rack()] += 1
diff --git a/weed/shell/command_volume_fix_replication_test.go b/weed/shell/command_volume_fix_replication_test.go
index 0113b32e7..4cfbd96aa 100644
--- a/weed/shell/command_volume_fix_replication_test.go
+++ b/weed/shell/command_volume_fix_replication_test.go
@@ -14,6 +14,7 @@ type testcase struct {
possibleLocation location
expected bool
}
+
func TestSatisfyReplicaPlacementComplicated(t *testing.T) {
var tests = []testcase{