update gen_testdata

- add more packets
- fix counter for one packet
This commit is contained in:
Nico Schottelius 2019-07-13 17:28:03 +02:00
commit 86885760b2
5 changed files with 114 additions and 9 deletions

View file

@ -101,6 +101,7 @@ lookup_table = {
}
def test_port1():
""" packets for a certain mac always go to nf0 """
pktCnt = 0
# First ethernet
@ -108,6 +109,14 @@ def test_port1():
pkt = Ether(dst=MAC2, src=MAC1)
pkt = pad_pkt(pkt, 64)
applyPkt(pkt, 'nf0', pktCnt)
pktCnt += 1
expPkt(pkt, 'nf0')
pktCnt += 1
applyPkt(pkt, 'nf1', pktCnt)
pktCnt += 1
expPkt(pkt, 'nf0')
# Test that packets are being mirrored