diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-05-10 14:14:16 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-05-10 14:14:16 +0900 |
commit | 9c94fd72f75260efbc22b1e05f660a51c3fafefb (patch) | |
tree | 54cdd1e317fb222f56169e6b082e5da00dee656c /packet/bgp/bgp_test.go | |
parent | 18738e1b437aad7d30eb4fd6687ff3e7b0c77a17 (diff) |
server: pretty notification error code log
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'packet/bgp/bgp_test.go')
-rw-r--r-- | packet/bgp/bgp_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packet/bgp/bgp_test.go b/packet/bgp/bgp_test.go index af4e2938..48366b61 100644 --- a/packet/bgp/bgp_test.go +++ b/packet/bgp/bgp_test.go @@ -446,3 +446,12 @@ func Test_FlowSpecNlriL2(t *testing.T) { t.Log(bytes.Equal(buf1, buf2)) } } + +func Test_NotificationErrorCode(t *testing.T) { + // boundary check + NewNotificationErrorCode(BGP_ERROR_MESSAGE_HEADER_ERROR, BGP_ERROR_SUB_BAD_MESSAGE_TYPE).String() + NewNotificationErrorCode(BGP_ERROR_MESSAGE_HEADER_ERROR, BGP_ERROR_SUB_BAD_MESSAGE_TYPE+1).String() + NewNotificationErrorCode(BGP_ERROR_MESSAGE_HEADER_ERROR, 0).String() + NewNotificationErrorCode(0, BGP_ERROR_SUB_BAD_MESSAGE_TYPE).String() + NewNotificationErrorCode(BGP_ERROR_ROUTE_REFRESH_MESSAGE_ERROR+1, 0).String() +} |