mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-25 06:20:42 +01:00
tests add parsing ec shard info
This commit is contained in:
1 parent
0623bf582e
commit
fc54afdba9
2 files changed
+107635
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user