updated for afrouterTest to work with new protos
Change-Id: Ibf1b74e73e3726c6dc83a79d6ff93acc44943103
diff --git a/tests/afrouter/suites/test1.json b/tests/afrouter/suites/test1.json
index 3634f99..38f2903 100644
--- a/tests/afrouter/suites/test1.json
+++ b/tests/afrouter/suites/test1.json
@@ -8,19 +8,20 @@
"package":"voltha"
},
{
- "importPath":"github.com/opencord/voltha-go/protos/",
+ "importPath":"github.com/opencord/voltha-protos/go/",
"service":"Configuration",
"package":"afrouter"
}
],
"Junk": [
{
- "importPath":"github.com/opencord/voltha-go/protos/",
+ "importPath":"github.com/opencord/voltha-protos/go/",
"service":"Configuration",
"package":"afrouter"
}
],
"imports": [
+ "github.com/opencord/voltha-protos/go/common"
],
"protoDesc":"voltha.pb",
"protoSubst": [
@@ -32,7 +33,8 @@
"clients": {
"imports": [
"github.com/golang/protobuf/ptypes/empty",
- "github.com/opencord/voltha-go/protos/openflow_13"
+ "github.com/opencord/voltha-protos/go/openflow_13",
+ "github.com/opencord/voltha-protos/go/common"
],
"endpoints": [
{
@@ -48,7 +50,9 @@
"servers": {
"imports": [
"github.com/golang/protobuf/ptypes/empty",
- "github.com/opencord/voltha-go/protos/openflow_13"
+ "github.com/opencord/voltha-protos/go/openflow_13",
+ "github.com/opencord/voltha-protos/go/common",
+ "github.com/opencord/voltha-protos/go/omci"
],
"endpoints": [
{
diff --git a/tests/afrouter/suites/test2.tmpl.json b/tests/afrouter/suites/test2.tmpl.json
index 1355068..8d8c6b1 100644
--- a/tests/afrouter/suites/test2.tmpl.json
+++ b/tests/afrouter/suites/test2.tmpl.json
@@ -8,13 +8,14 @@
"package":"voltha"
},
{
- "importPath":"github.com/opencord/voltha-go/protos/",
+ "importPath":"github.com/opencord/voltha-protos/go/",
"service":"Configuration",
"package":"afrouter"
}
],
"imports": [
- "github.com/golang/protobuf/ptypes/empty"
+ "github.com/golang/protobuf/ptypes/empty",
+ "github.com/opencord/voltha-protos/go/common"
],
"protoDesc":"voltha.pb",
"protoSubst": [
@@ -26,7 +27,8 @@
"clients": {
"imports": [
"github.com/golang/protobuf/ptypes/empty",
- "github.com/opencord/voltha-go/protos/openflow_13"
+ "github.com/opencord/voltha-protos/go/openflow_13",
+ "github.com/opencord/voltha-protos/go/common"
],
"endpoints": [
{
@@ -42,7 +44,9 @@
"servers": {
"imports": [
"github.com/golang/protobuf/ptypes/empty",
- "github.com/opencord/voltha-go/protos/openflow_13"
+ "github.com/opencord/voltha-protos/go/openflow_13",
+ "github.com/opencord/voltha-protos/go/omci",
+ "github.com/opencord/voltha-protos/go/common"
],
"endpoints": [
{
diff --git a/tests/afrouter/suites/test3.tmpl.json b/tests/afrouter/suites/test3.tmpl.json
index b3118ff..9bcaef9 100644
--- a/tests/afrouter/suites/test3.tmpl.json
+++ b/tests/afrouter/suites/test3.tmpl.json
@@ -3,19 +3,20 @@
"cmdLine":"afrouter -config arouter_test.json -logLevel 1",
"protoFiles": [
{
- "importPath":"github.com/opencord/voltha-go/protos/",
+ "importPath":"github.com/opencord/voltha-protos/go/",
"service":"VolthaService",
"package":"voltha"
},
{
- "importPath":"github.com/opencord/voltha-go/protos/",
+ "importPath":"github.com/opencord/voltha-protos/go/",
"service":"Configuration",
"package":"afrouter"
}
],
"imports": [
"github.com/golang/protobuf/ptypes/empty",
- "github.com/opencord/voltha-go/protos/openflow_13"
+ "github.com/opencord/voltha-protos/go/openflow_13",
+ "github.com/opencord/voltha-protos/go/common"
],
"protoDesc":"voltha.pb",
"protoSubst": [
@@ -27,7 +28,8 @@
"clients": {
"imports": [
"github.com/golang/protobuf/ptypes/empty",
- "github.com/opencord/voltha-go/protos/openflow_13"
+ "github.com/opencord/voltha-protos/go/openflow_13",
+ "github.com/opencord/voltha-protos/go/common"
],
"endpoints": [
{
@@ -43,7 +45,9 @@
"servers": {
"imports": [
"github.com/golang/protobuf/ptypes/empty",
- "github.com/opencord/voltha-go/protos/openflow_13"
+ "github.com/opencord/voltha-protos/go/openflow_13",
+ "github.com/opencord/voltha-protos/go/omci",
+ "github.com/opencord/voltha-protos/go/common"
],
"endpoints": [
{
diff --git a/tests/afrouter/templates/client.go b/tests/afrouter/templates/client.go
index db34efd..fe559d6 100644
--- a/tests/afrouter/templates/client.go
+++ b/tests/afrouter/templates/client.go
@@ -81,17 +81,15 @@
{{range .Methods}}
case "{{.Name}}":
var hdr metadata.MD
- switch t := param.(type) {
+ switch param.(type) {
case *{{.Param}}:
{{if .Ss}}
- _=t
_=hdr
{{else if .Cs}}
- _=t
_=hdr
{{else}}
client := {{.Pkg}}.New{{.Svc}}Client({{$.Name}}Client.conn)
- res, err := client.{{.Name}}(ctx, t, grpc.Header(&hdr))
+ res, err := client.{{.Name}}(ctx, param.(*{{.Param}}), grpc.Header(&hdr))
if err != nil {
return errors.New("Error sending method {{.Name}}")
}