diff options
| author | chrislu <chris.lu@gmail.com> | 2022-10-09 22:47:55 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-10-09 22:47:55 -0700 |
| commit | fc54afdba905537eed85e0433a9cc447018ea631 (patch) | |
| tree | 96e52be09965d3c7f39b11f3911b054d442cc59a /weed/shell/command_volume_list_test.go | |
| parent | 0623bf582ee6dd7f72f45b7953ddf9a8a293433a (diff) | |
| download | seaweedfs-fc54afdba905537eed85e0433a9cc447018ea631.tar.xz seaweedfs-fc54afdba905537eed85e0433a9cc447018ea631.zip | |
tests add parsing ec shard info
Diffstat (limited to 'weed/shell/command_volume_list_test.go')
| -rw-r--r-- | weed/shell/command_volume_list_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/weed/shell/command_volume_list_test.go b/weed/shell/command_volume_list_test.go index 6c40f6707..1c8368229 100644 --- a/weed/shell/command_volume_list_test.go +++ b/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 |
