diff options
-rw-r--r-- | ryu/tests/packet_data/bgp4/bgp4-keepalive | bin | 19 -> 0 bytes | |||
-rw-r--r-- | ryu/tests/packet_data/bgp4/bgp4-keepalive.pcap | bin | 0 -> 113 bytes | |||
-rw-r--r-- | ryu/tests/packet_data/bgp4/bgp4-open | bin | 53 -> 0 bytes | |||
-rw-r--r-- | ryu/tests/packet_data/bgp4/bgp4-open.pcap | bin | 0 -> 147 bytes | |||
-rw-r--r-- | ryu/tests/packet_data/bgp4/bgp4-update | bin | 52 -> 0 bytes | |||
-rw-r--r-- | ryu/tests/packet_data/bgp4/bgp4-update.pcap | bin | 0 -> 146 bytes | |||
-rw-r--r-- | ryu/tests/unit/packet/test_bgp.py | 10 |
7 files changed, 5 insertions, 5 deletions
diff --git a/ryu/tests/packet_data/bgp4/bgp4-keepalive b/ryu/tests/packet_data/bgp4/bgp4-keepalive Binary files differdeleted file mode 100644 index 78ebde2e..00000000 --- a/ryu/tests/packet_data/bgp4/bgp4-keepalive +++ /dev/null diff --git a/ryu/tests/packet_data/bgp4/bgp4-keepalive.pcap b/ryu/tests/packet_data/bgp4/bgp4-keepalive.pcap Binary files differnew file mode 100644 index 00000000..355e9dab --- /dev/null +++ b/ryu/tests/packet_data/bgp4/bgp4-keepalive.pcap diff --git a/ryu/tests/packet_data/bgp4/bgp4-open b/ryu/tests/packet_data/bgp4/bgp4-open Binary files differdeleted file mode 100644 index 701f2fbd..00000000 --- a/ryu/tests/packet_data/bgp4/bgp4-open +++ /dev/null diff --git a/ryu/tests/packet_data/bgp4/bgp4-open.pcap b/ryu/tests/packet_data/bgp4/bgp4-open.pcap Binary files differnew file mode 100644 index 00000000..1ef507bb --- /dev/null +++ b/ryu/tests/packet_data/bgp4/bgp4-open.pcap diff --git a/ryu/tests/packet_data/bgp4/bgp4-update b/ryu/tests/packet_data/bgp4/bgp4-update Binary files differdeleted file mode 100644 index 8fbc238d..00000000 --- a/ryu/tests/packet_data/bgp4/bgp4-update +++ /dev/null diff --git a/ryu/tests/packet_data/bgp4/bgp4-update.pcap b/ryu/tests/packet_data/bgp4/bgp4-update.pcap Binary files differnew file mode 100644 index 00000000..37354938 --- /dev/null +++ b/ryu/tests/packet_data/bgp4/bgp4-update.pcap diff --git a/ryu/tests/unit/packet/test_bgp.py b/ryu/tests/unit/packet/test_bgp.py index 17bef871..b3c11984 100644 --- a/ryu/tests/unit/packet/test_bgp.py +++ b/ryu/tests/unit/packet/test_bgp.py @@ -22,6 +22,7 @@ import unittest from nose.tools import eq_ from nose.tools import ok_ +from ryu.lib.packet import packet from ryu.lib.packet import bgp from ryu.lib.packet import afi from ryu.lib.packet import safi @@ -208,11 +209,10 @@ class Test_bgp(unittest.TestCase): for f in files: print('testing %s' % f) - binmsg = open(BGP4_PACKET_DATA_DIR + f, 'rb').read() - msg, rest = bgp.BGPMessage.parser(binmsg) - binmsg2 = msg.serialize() - eq_(binmsg, binmsg2) - eq_(rest, b'') + msg_buf = open(BGP4_PACKET_DATA_DIR + f + '.pcap', 'rb').read() + pkt = packet.Packet(msg_buf) + pkt.serialize() + eq_(msg_buf, pkt.data) def test_json1(self): opt_param = [bgp.BGPOptParamCapabilityUnknown(cap_code=200, |