Browse Source

tests add parsing ec shard info

pull/3813/head
chrislu 2 years ago
parent
commit
fc54afdba9
  1. 11
      weed/shell/command_volume_list_test.go
  2. 107624
      weed/shell/volume.list2.txt

11
weed/shell/command_volume_list_test.go

@ -19,6 +19,14 @@ func TestParsing(t *testing.T) {
assert.Equal(t, 5, len(topo.DataCenterInfos))
topo = parseOutput(topoData2)
dataNodes := topo.DataCenterInfos[0].RackInfos[0].DataNodeInfos
assert.Equal(t, 14, len(dataNodes))
diskInfo := dataNodes[0].DiskInfos[""]
assert.Equal(t, 1559, len(diskInfo.VolumeInfos))
assert.Equal(t, 6740, len(diskInfo.EcShardInfos))
}
func parseOutput(output string) *master_pb.TopologyInfo {
@ -116,3 +124,6 @@ func parseOutput(output string) *master_pb.TopologyInfo {
//go:embed volume.list.txt
var topoData string
//go:embed volume.list2.txt
var topoData2 string

107624
weed/shell/volume.list2.txt
File diff suppressed because it is too large
View File

Loading…
Cancel
Save