summaryrefslogtreecommitdiffstats
path: root/test/test_nfvbench.py
diff options
context:
space:
mode:
authorFrançois-Régis MENGUY <francoisregis.menguy@orange.com>2018-11-27 11:31:00 +0100
committerfmenguy <francoisregis.menguy@orange.com>2019-06-05 15:40:39 +0200
commit4453818e3af2143e099a5f578c4a73b25abbfe58 (patch)
tree66783c9a978916033659ed6fe0e89035c301202b /test/test_nfvbench.py
parenta3578fdb7496e7f1234eef4ac73086ba1d57fcf2 (diff)
Add L3 traffic management with Neutron routers
Change-Id: Ic9bff87e0d78652de28b3a756f9ebc342983cfbb Signed-off-by: fmenguy <francoisregis.menguy@orange.com>
Diffstat (limited to 'test/test_nfvbench.py')
-rw-r--r--test/test_nfvbench.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/test_nfvbench.py b/test/test_nfvbench.py
index 2a7ca77..7c5fb83 100644
--- a/test/test_nfvbench.py
+++ b/test/test_nfvbench.py
@@ -152,6 +152,19 @@ def test_ip_block():
assert ipb.get_ip(255) == '10.0.0.255'
with pytest.raises(IndexError):
ipb.get_ip(256)
+ ipb = IpBlock('10.0.0.0', '0.0.0.1', 1)
+ assert ipb.get_ip() == '10.0.0.0'
+ with pytest.raises(IndexError):
+ ipb.get_ip(1)
+
+ ipb = IpBlock('10.0.0.0', '0.0.0.2', 256)
+ assert ipb.get_ip() == '10.0.0.0'
+ assert ipb.get_ip(1) == '10.0.0.2'
+ assert ipb.get_ip(127) == '10.0.0.254'
+ assert ipb.get_ip(128) == '10.0.1.0'
+ with pytest.raises(IndexError):
+ ipb.get_ip(256)
+
# verify with step larger than 1
ipb = IpBlock('10.0.0.0', '0.0.0.2', 256)
assert ipb.get_ip() == '10.0.0.0'
@@ -341,7 +354,7 @@ def test_ndr_at_lr():
# tx packets should be line rate for 64B and no drops...
assert tg.get_tx_pps_dropped_pps(100) == (LR_64B_PPS, 0)
# NDR and PDR should be at 100%
- traffic_client.ensure_end_to_end()
+ # traffic_client.ensure_end_to_end()
results = traffic_client.get_ndr_and_pdr()
assert_ndr_pdr(results, 200.0, 0.0, 200.0, 0.0)