diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2016-11-07 16:04:18 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-11-14 12:14:19 +0900 |
commit | 48f577d1f8e4163ae75ae316b319dffa5f4e168e (patch) | |
tree | 19889690afc7294a5f9ac7ef569cd9328348dabf | |
parent | 31364ba91d12efe1ef6f6373874c153598405deb (diff) |
test_bgp: Uncomment out test case for UPDATE
Now BGP packet library supports 32 bits AS number and Extended
Length flag in path attributes, this patch fixes to uncomment
out the test case for UPDATE message.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/tests/unit/packet/test_bgp.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ryu/tests/unit/packet/test_bgp.py b/ryu/tests/unit/packet/test_bgp.py index 9638457f..2ab213c0 100644 --- a/ryu/tests/unit/packet/test_bgp.py +++ b/ryu/tests/unit/packet/test_bgp.py @@ -16,8 +16,10 @@ from __future__ import print_function +import logging import os import sys + import unittest from nose.tools import eq_ from nose.tools import ok_ @@ -29,6 +31,8 @@ from ryu.lib.packet import afi from ryu.lib.packet import safi +LOG = logging.getLogger(__name__) + BGP4_PACKET_DATA_DIR = os.path.join( os.path.dirname(sys.modules[__name__].__file__), '../../packet_data/bgp4/') @@ -241,10 +245,7 @@ class Test_bgp(unittest.TestCase): def test_parser(self): files = [ 'bgp4-open', - # commented out because - # 1. we don't support 32 bit AS numbers in AS_PATH - # 2. quagga always uses EXTENDED for AS_PATH - # 'bgp4-update', + 'bgp4-update', 'bgp4-keepalive', 'evpn_esi_arbitrary', 'evpn_esi_lacp', @@ -259,11 +260,11 @@ class Test_bgp(unittest.TestCase): ] for f in files: - print('\n*** testing %s ...' % f) + LOG.debug('*** testing %s ...', f) for _, buf in pcaplib.Reader( open(BGP4_PACKET_DATA_DIR + f + '.pcap', 'rb')): pkt = packet.Packet(buf) - print(pkt) + LOG.debug(pkt) pkt.serialize() eq_(buf, pkt.data) |