tests add parsing ec shard info

This commit is contained in:
chrislu 2022-10-09 22:47:55 -07:00
parent 0623bf582e
commit fc54afdba9
2 changed files with 107635 additions and 0 deletions

View File

@ -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 Normal file

File diff suppressed because it is too large Load Diff