mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-06-30 14:21:00 +02:00
tests add parsing ec shard info
This commit is contained in:
parent
0623bf582e
commit
fc54afdba9
|
@ -19,6 +19,14 @@ func TestParsing(t *testing.T) {
|
||||||
|
|
||||||
assert.Equal(t, 5, len(topo.DataCenterInfos))
|
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 {
|
func parseOutput(output string) *master_pb.TopologyInfo {
|
||||||
|
@ -116,3 +124,6 @@ func parseOutput(output string) *master_pb.TopologyInfo {
|
||||||
|
|
||||||
//go:embed volume.list.txt
|
//go:embed volume.list.txt
|
||||||
var topoData string
|
var topoData string
|
||||||
|
|
||||||
|
//go:embed volume.list2.txt
|
||||||
|
var topoData2 string
|
||||||
|
|
107624
weed/shell/volume.list2.txt
Normal file
107624
weed/shell/volume.list2.txt
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue