mirror of
https://gitee.com/willfree/mlsr.git
synced 2026-10-04 19:42:02 +08:00
70 lines
1.4 KiB
Go
70 lines
1.4 KiB
Go
// Package route
|
|
// @Author: Wang Feng
|
|
// @Description:
|
|
// @Version: 0.1.0
|
|
// @Date: 2022/6/17 11:28
|
|
// @Copyright: MIN-Group;国家重大科技基础设施——未来网络北大实验室;深圳市信息论与未来网络重点实验室
|
|
//
|
|
|
|
package route
|
|
|
|
import (
|
|
common2 "minlib/common"
|
|
"minlib/logicface"
|
|
"mlsr/common"
|
|
"mlsr/lsdb"
|
|
"testing"
|
|
)
|
|
|
|
//
|
|
// TestRoutingTable_Init
|
|
// @Description: 测试初始化
|
|
// @param t
|
|
//
|
|
func TestRoutingTable_Init(t *testing.T) {
|
|
// 1. 组件初始化
|
|
// 配置文件初始化
|
|
mlsrConfig, err := common.ParseConfig(testConfigPath)
|
|
if err != nil {
|
|
common2.LogInfo("配置文件解析错误")
|
|
}
|
|
// 调度器初始化
|
|
sche := new(lsdb.MlsrScheduler)
|
|
sche.Init()
|
|
// LogicFace初始化(假设初始化,暂时用不到)
|
|
face := new(logicface.LogicFace)
|
|
// LSDB初始化
|
|
mlsdb := new(lsdb.Lsdb)
|
|
mlsdb.Init(mlsrConfig, sche, face)
|
|
|
|
// 2. 路由表初始化
|
|
rt := new(RoutingTable)
|
|
rt.Init(mlsrConfig, sche, mlsdb)
|
|
}
|
|
|
|
//
|
|
// TestRoutingTable_AddNextHop
|
|
// @Description: 测试构造路由表及其拓扑
|
|
// @param t
|
|
//
|
|
func TestRoutingTable_AddNextHop(t *testing.T) {
|
|
}
|
|
|
|
//
|
|
// TestRoutingTable_Calculate
|
|
// @Description: 测试计算
|
|
// @param t
|
|
//
|
|
func TestRoutingTable_Calculate(t *testing.T) {
|
|
|
|
}
|
|
|
|
//
|
|
// TestRoutingTable_ScheduleRoutingTableCalculation
|
|
// @Description: 测试安排路由计算
|
|
// @param t
|
|
//
|
|
func TestRoutingTable_ScheduleRoutingTableCalculation(t *testing.T) {
|
|
|
|
}
|