diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2021-08-08 18:55:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-08 18:55:53 -0700 |
| commit | 52fcce81c64348dccf706e52161cf3fcf71e1df8 (patch) | |
| tree | eff9e3a111e227de7803c4ab5bd03ea79897bb57 /weed/shell/command_volume_balance_test.go | |
| parent | 4370a4db634f2268526911842a804d9dee97aadc (diff) | |
| parent | 882a93dacd2ca8549af50b80a8a98a861fdee0ed (diff) | |
| download | seaweedfs-52fcce81c64348dccf706e52161cf3fcf71e1df8.tar.xz seaweedfs-52fcce81c64348dccf706e52161cf3fcf71e1df8.zip | |
Merge pull request #2241 from chrislusf/add_remote_storage
WIP: remote storage
Diffstat (limited to 'weed/shell/command_volume_balance_test.go')
| -rw-r--r-- | weed/shell/command_volume_balance_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/weed/shell/command_volume_balance_test.go b/weed/shell/command_volume_balance_test.go index b77811f51..d6624bbcc 100644 --- a/weed/shell/command_volume_balance_test.go +++ b/weed/shell/command_volume_balance_test.go @@ -1,6 +1,8 @@ package shell import ( + "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/stretchr/testify/assert" "testing" "github.com/chrislusf/seaweedfs/weed/pb/master_pb" @@ -181,3 +183,14 @@ func TestBalance(t *testing.T) { } } + +func TestVolumeSelection(t *testing.T) { + topologyInfo := parseOutput(topoData) + + vids, err := collectVolumeIdsForTierChange(nil, topologyInfo, 1000, types.ToDiskType("hdd"), "", 20.0, 0); + if err != nil { + t.Errorf("collectVolumeIdsForTierChange: %v", err) + } + assert.Equal(t, 378, len(vids)) + +} |
