blob: a15230d7cc7388c4db7c5fa50ddc1d178d8d60d8 [file] [log] [blame]
{
"environment":{
"cmdLine":"afrouter -config arouter_test.json -logLevel 1",
"protoFiles": [
{
"importPath":"github.com/opencord/voltha-protos/go/",
"service":"VolthaService",
"package":"voltha"
},
{
"importPath":"github.com/opencord/voltha-protos/go/",
"service":"Configuration",
"package":"afrouter"
}
],
"imports": [
"github.com/golang/protobuf/ptypes/empty",
"github.com/opencord/voltha-protos/go/common"
],
"protoDesc":"voltha.pb",
"protoSubst": [
{
"from":"google.protobuf.Empty",
"to":"empty.Empty"
}
],
"clients": {
"imports": [
"github.com/golang/protobuf/ptypes/empty",
"github.com/opencord/voltha-protos/go/openflow_13",
"github.com/opencord/voltha-protos/go/common"
],
"endpoints": [
{
"name":"client",
"port":"5000"
},
{
"name":"stats",
"port":"55554"
}
]
},
"servers": {
"imports": [
"github.com/golang/protobuf/ptypes/empty",
"github.com/opencord/voltha-protos/go/openflow_13",
"github.com/opencord/voltha-protos/go/omci",
"github.com/opencord/voltha-protos/go/common"
],
"endpoints": [
{
"name":"core11",
"port":"5011"
},
{
"name":"core12",
"port":"5012"
},
{
"name":"core21",
"port":"5021"
},
{
"name":"core22",
"port":"5022"
},
{
"name":"core31",
"port":"5031"
},
{
"name":"core32",
"port":"5032"
}
]
}
},
"tests":[
{{range $k,$v := .CrTests}}
{
"name":"Test CreateDevice",
"send": {
"client":"client",
"method":"CreateDevice",
"param":"{Type:\"simulated_olt\"}",
"expect":"{Id:\"abcd1234{{$k}}\",Type:\"simulated_olt\"}",
"_meta":""
},
"servers": [
{
"name":"core{{$v.Core}}1",
"meta": [
{
"key":"voltha_serial_number",
"value":"{{$v.SerNo}}"
}
]
},
{
"name":"core{{$v.Core}}2",
"meta": [
{
"key":"voltha_serial_number",
"value":"{{$v.SerNo}}"
}
]
}
]
},
{{end}}
{{range $k,$v := .GetTests}}
{
"name":"Test EnableDevice",
"send": {
"client":"client",
"_method":"GetDevice",
"method":"EnableDevice",
"param":"{Id:\"abcd1234{{$k}}\"}",
"expect":"{}",
"_expect":"{Id:\"abcd1234{{$k}}\",Type:\"simulated_olt\"}",
"_meta":""
},
"servers": [
{
"name":"core{{$v.Core}}1",
"meta": [
{
"key":"voltha_serial_number",
"value":"{{$v.SerNo}}"
}
]
},
{
"name":"core{{$v.Core}}2",
"meta": [
{
"key":"voltha_serial_number",
"value":"{{$v.SerNo}}"
}
]
}
]
},
{{end}}
{
"name":"Test GetDevice",
"send": {
"client":"client",
"method":"GetDevice",
"param":"{Id:\"abcd12340\"}",
"expect":"{Id:\"abcd12340\",Type:\"simulated_olt\"}",
"_meta":""
},
"servers": [
{
"name":"core11",
"meta": [
{
"key":"voltha_serial_number",
"value":"110000"
}
]
},
{
"name":"core12",
"meta": [
{
"key":"voltha_serial_number",
"value":"110000"
}
]
}
]
},
{
"name":"Test Subscribe",
"send": {
"client":"client",
"method":"Subscribe",
"param":"{OfagentId:\"Agent007\"}",
"meta": [
{
"key":"voltha_backend_name",
"value":""
}
],
"expect":"{OfagentId:\"Agent007\",VolthaId:\"core11\"}",
"expectMeta": [
{
"key":"voltha_backend_name",
"value":"vcore1"
}
]
},
"servers": [
{
"name":"core11",
"meta": [
{
"key":"voltha_serial_number",
"value":"110001"
},
{
"key":"voltha_backend_name",
"value":""
}
]
},
{
"name":"core12",
"meta": [
{
"key":"voltha_serial_number",
"value":"110001"
},
{
"key":"voltha_backend_name",
"value":""
}
]
}
]
},
{
"_COMMENT":"If this test case fails, there could be a goroutine leak",
"name":"Get goroutine count",
"send": {
"client":"stats",
"method":"GetGoroutineCount",
"param":"{}",
"meta": [ ],
"expect":"{Count:45}",
"expectMeta": [ ]
},
"servers": [ ]
}
]
}