diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-03-04 09:54:20 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-03-04 09:54:20 +0900 |
commit | 0d908abbcb8ee29109e01ec6374ac943e811eae8 (patch) | |
tree | c1b6c68bac0ca83a7de7d95cd295dfb86be67460 | |
parent | 360a4ba3064c3b86fb39075739f7bdfca5027a3d (diff) |
zebra: fix unittest on OSX
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | zebra/zapi_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/zebra/zapi_test.go b/zebra/zapi_test.go index 5fcdbcc6..46dc6c38 100644 --- a/zebra/zapi_test.go +++ b/zebra/zapi_test.go @@ -17,10 +17,11 @@ package zebra import ( "encoding/binary" - "github.com/stretchr/testify/assert" "net" "syscall" "testing" + + "github.com/stretchr/testify/assert" ) func Test_Header(t *testing.T) { @@ -465,6 +466,8 @@ func Test_NexthopRegisterBody(t *testing.T) { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, } + binary.BigEndian.PutUint16(bufIn[1:], syscall.AF_INET) + binary.BigEndian.PutUint16(bufIn[9:], syscall.AF_INET6) // Test DecodeFromBytes() b := &NexthopRegisterBody{Api: NEXTHOP_REGISTER} |