diff options
Diffstat (limited to 'weed/shell/command_ec_common_test.go')
| -rw-r--r-- | weed/shell/command_ec_common_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/weed/shell/command_ec_common_test.go b/weed/shell/command_ec_common_test.go index 5b4983413..08e4a41c7 100644 --- a/weed/shell/command_ec_common_test.go +++ b/weed/shell/command_ec_common_test.go @@ -122,7 +122,12 @@ func TestPickRackToBalanceShardsInto(t *testing.T) { rackToShardCount := countShardsByRack(vid, locations) averageShardsPerEcRack := ceilDivide(erasure_coding.TotalShardsCount, len(racks)) - got := pickRackToBalanceShardsInto(racks, rackToShardCount, nil, averageShardsPerEcRack) + got, gotErr := pickRackToBalanceShardsInto(racks, rackToShardCount, nil, averageShardsPerEcRack) + if gotErr != nil { + t.Errorf("volume %q: %s", tc.vid, gotErr.Error()) + continue + } + if string(got) == "" && len(tc.wantOneOf) == 0 { continue } |
