aboutsummaryrefslogtreecommitdiffstats
path: root/core/core_test.go
diff options
context:
space:
mode:
authorMilan Lenco <milan.lenco@pantheon.tech>2018-01-25 10:15:48 +0100
committerMilan Lenco <milan.lenco@pantheon.tech>2018-01-25 10:15:48 +0100
commit8ca20507d15703412c18b07d4f4ce6b4de989de6 (patch)
treeaef60a5ef4dd150b62958b757e706f8c3311c68c /core/core_test.go
parent545eaea1c41c800794bb910a47de281e7e8df492 (diff)
Update examples, tests and testdata after binapi-generator update.
Change-Id: I738d501cbbb6673010a32847df3f1c87050b8d36 Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
Diffstat (limited to 'core/core_test.go')
-rw-r--r--core/core_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/core_test.go b/core/core_test.go
index 37c0b9c..682309d 100644
--- a/core/core_test.go
+++ b/core/core_test.go
@@ -22,6 +22,7 @@ import (
"git.fd.io/govpp.git/core"
"git.fd.io/govpp.git/core/bin_api/vpe"
"git.fd.io/govpp.git/examples/bin_api/interfaces"
+ "git.fd.io/govpp.git/examples/bin_api/stats"
. "github.com/onsi/gomega"
)
@@ -222,11 +223,11 @@ func TestCodec(t *testing.T) {
codec := &core.MsgCodec{}
// request
- data, err := codec.EncodeMsg(&vpe.CreateLoopback{MacAddress: []byte{1, 2, 3, 4, 5, 6}}, 11)
+ data, err := codec.EncodeMsg(&interfaces.CreateLoopback{MacAddress: []byte{1, 2, 3, 4, 5, 6}}, 11)
Expect(err).ShouldNot(HaveOccurred())
Expect(data).ShouldNot(BeEmpty())
- msg1 := &vpe.CreateLoopback{}
+ msg1 := &interfaces.CreateLoopback{}
err = codec.DecodeMsg(data, msg1)
Expect(err).ShouldNot(HaveOccurred())
Expect(msg1.MacAddress).To(BeEquivalentTo([]byte{1, 2, 3, 4, 5, 6}))
@@ -242,11 +243,11 @@ func TestCodec(t *testing.T) {
Expect(msg2.Retval).To(BeEquivalentTo(55))
// other
- data, err = codec.EncodeMsg(&vpe.VnetIP4FibCounters{VrfID: 77}, 33)
+ data, err = codec.EncodeMsg(&stats.VnetIP4FibCounters{VrfID: 77}, 33)
Expect(err).ShouldNot(HaveOccurred())
Expect(data).ShouldNot(BeEmpty())
- msg3 := &vpe.VnetIP4FibCounters{}
+ msg3 := &stats.VnetIP4FibCounters{}
err = codec.DecodeMsg(data, msg3)
Expect(err).ShouldNot(HaveOccurred())
Expect(msg3.VrfID).To(BeEquivalentTo(77))