summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorkishiguro <ishi@hash-set.com>2016-09-28 12:30:35 -0700
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-09-29 16:29:15 -0700
commit36ea117e745e39030f8b7b9bccef43ae34dc52c3 (patch)
tree5b3f6d1a3d5ccedff7693d3457be151435777aaa
parent554f309c9020fa580b7ae74766b069a7ae095444 (diff)
Apply previous change's to test as well.
-rw-r--r--server/zclient_test.go4
-rw-r--r--zebra/zapi_test.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/server/zclient_test.go b/server/zclient_test.go
index f4391b09..7338adcb 100644
--- a/server/zclient_test.go
+++ b/server/zclient_test.go
@@ -29,9 +29,9 @@ func Test_createRequestFromIPRouteMessage(t *testing.T) {
m := &zebra.Message{}
h := &zebra.Header{
- Len: zebra.HEADER_SIZE,
+ Len: zebra.HeaderSize(2),
Marker: zebra.HEADER_MARKER,
- Version: zebra.VERSION,
+ Version: 2,
Command: zebra.IPV4_ROUTE_ADD,
}
diff --git a/zebra/zapi_test.go b/zebra/zapi_test.go
index be464235..4de3f9b7 100644
--- a/zebra/zapi_test.go
+++ b/zebra/zapi_test.go
@@ -29,7 +29,7 @@ func Test_Header(t *testing.T) {
buf := make([]byte, 6)
binary.BigEndian.PutUint16(buf[0:], 10)
buf[2] = HEADER_MARKER
- buf[3] = VERSION
+ buf[3] = 2
binary.BigEndian.PutUint16(buf[4:], uint16(IPV4_ROUTE_ADD))
h := &Header{}
err := h.DecodeFromBytes(buf)
@@ -44,7 +44,7 @@ func Test_Header(t *testing.T) {
assert.Equal(h, h2)
// header_size mismatch
- buf = make([]byte, HEADER_SIZE-1)
+ buf = make([]byte, HeaderSize(2)-1)
binary.BigEndian.PutUint16(buf[0:], 10)
buf[2] = 0xff
buf[3] = 0x02