From 48f577d1f8e4163ae75ae316b319dffa5f4e168e Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Mon, 7 Nov 2016 16:04:18 +0900 Subject: 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 Signed-off-by: FUJITA Tomonori --- ryu/tests/unit/packet/test_bgp.py | 13 +++++++------ 1 file 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) -- cgit v1.2.3