Skip to content

Commit 27e81f5

Browse files
mhines01Raj998
authored andcommitted
Update to build to use the right gnoi protos
update unit tests to pass
1 parent 79c5504 commit 27e81f5

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

test/BUILD.bazel

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ go_test(
66
srcs = ["simple_test.go"],
77
deps = [
88
"//github.com/golang/protobuf/proto:proto",
9-
"//github.com/openconfig/reference/rpc/gnoi:go_default_library",
10-
"//github.com/openconfig/reference/rpc/gnoi/bgp:go_default_library",
11-
"//github.com/openconfig/reference/rpc/gnoi/cert:go_default_library",
12-
"//github.com/openconfig/reference/rpc/gnoi/file:go_default_library",
13-
"//github.com/openconfig/reference/rpc/gnoi/interface:go_default_library",
14-
"//github.com/openconfig/reference/rpc/gnoi/layer2:go_default_library",
15-
"//github.com/openconfig/reference/rpc/gnoi/mpls:go_default_library",
16-
"//github.com/openconfig/reference/rpc/gnoi/system:go_default_library",
9+
"//github.com/openconfig/gnoi:go_default_library",
10+
"//github.com/openconfig/gnoi/bgp:go_default_library",
11+
"//github.com/openconfig/gnoi/cert:go_default_library",
12+
"//github.com/openconfig/gnoi/file:go_default_library",
13+
"//github.com/openconfig/gnoi/interface:go_default_library",
14+
"//github.com/openconfig/gnoi/layer2:go_default_library",
15+
"//github.com/openconfig/gnoi/mpls:go_default_library",
16+
"//github.com/openconfig/gnoi/system:go_default_library",
1717
],
1818
)

test/simple_test.go

+6-7
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import (
44
"testing"
55

66
"github.com/golang/protobuf/proto/proto"
7-
8-
gnoi "github.com/openconfig/reference/rpc/gnoi"
9-
gbgp "github.com/openconfig/reference/rpc/gnoi/bgp"
7+
"github.com/openconfig/gnoi"
8+
gbgp "github.com/openconfig/gnoi/bgp"
109
)
1110

1211
func TestGNOI(t *testing.T) {
@@ -18,16 +17,16 @@ func TestGNOI(t *testing.T) {
1817
desc: "gnoi.Path",
1918
in: &gnoi.Path{
2019
Origin: "oc",
21-
Elem: []*gnoi.PathElem{{name: "interfaces", key: map[string]string{"name": "Ethernet1/1/0"}}},
20+
Elem: []*gnoi.PathElem{{Name: "interfaces", Key: map[string]string{"name": "Ethernet1/1/0"}}},
2221
},
23-
want: "elements: \"foo\"\nelements: \"path\"\n",
22+
want: "origin: \"oc\"\nelem: <\n name: \"interfaces\"\n key: <\n key: \"name\"\n value: \"Ethernet1/1/0\"\n >\n>\n",
2423
}, {
2524
desc: "gnoi.HashType",
2625
in: &gnoi.HashType{
27-
Method: gnoi.HashMethod_MD5,
26+
Method: gnoi.HashType_MD5,
2827
Hash: []byte("foo"),
2928
},
30-
want: "elements: \"foo\"\nelements: \"path\"\n",
29+
want: "method: MD5\nhash: \"foo\"\n",
3130
}, {
3231
desc: "bgp.ClearBGPNeighborRequest",
3332
in: &gbgp.ClearBGPNeighborRequest{

0 commit comments

Comments
 (0)