aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/scenarios
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/benchmark/scenarios')
-rw-r--r--tests/unit/benchmark/scenarios/networking/test_pktgen.py14
-rw-r--r--tests/unit/benchmark/scenarios/networking/test_vnf_generic.py6
2 files changed, 13 insertions, 7 deletions
diff --git a/tests/unit/benchmark/scenarios/networking/test_pktgen.py b/tests/unit/benchmark/scenarios/networking/test_pktgen.py
index 0ca31d484..3928aacde 100644
--- a/tests/unit/benchmark/scenarios/networking/test_pktgen.py
+++ b/tests/unit/benchmark/scenarios/networking/test_pktgen.py
@@ -264,7 +264,7 @@ class PktgenTestCase(unittest.TestCase):
p._get_available_queue_number()
mock_ssh.SSH.from_node().execute.assert_called_with(
- "sudo ethtool -l eth0 | grep Combined | head -1 |" \
+ "sudo ethtool -l eth0 | grep Combined | head -1 |"
"awk '{printf $2}'")
def test_pktgen_unsuccessful_get_available_queue_number(self, mock_ssh):
@@ -290,7 +290,7 @@ class PktgenTestCase(unittest.TestCase):
p._get_usable_queue_number()
mock_ssh.SSH.from_node().execute.assert_called_with(
- "sudo ethtool -l eth0 | grep Combined | tail -1 |" \
+ "sudo ethtool -l eth0 | grep Combined | tail -1 |"
"awk '{printf $2}'")
def test_pktgen_unsuccessful_get_usable_queue_number(self, mock_ssh):
@@ -541,7 +541,7 @@ class PktgenTestCase(unittest.TestCase):
p._is_irqbalance_disabled = mock_result1
mock_result2 = mock.Mock()
- mock_result2.return_value = "virtio_net"
+ mock_result2.return_value = "virtio_net"
p._get_vnic_driver_name = mock_result2
mock_result3 = mock.Mock()
@@ -571,7 +571,7 @@ class PktgenTestCase(unittest.TestCase):
p._is_irqbalance_disabled = mock_result1
mock_result2 = mock.Mock()
- mock_result2.return_value = "virtio_net"
+ mock_result2.return_value = "virtio_net"
p._get_vnic_driver_name = mock_result2
mock_result3 = mock.Mock()
@@ -601,7 +601,7 @@ class PktgenTestCase(unittest.TestCase):
p._is_irqbalance_disabled = mock_result1
mock_result2 = mock.Mock()
- mock_result2.return_value = "ixgbevf"
+ mock_result2.return_value = "ixgbevf"
p._get_vnic_driver_name = mock_result2
p.multiqueue_setup()
@@ -623,7 +623,7 @@ class PktgenTestCase(unittest.TestCase):
p._is_irqbalance_disabled = mock_result1
mock_result2 = mock.Mock()
- mock_result2.return_value = "ixgbevf"
+ mock_result2.return_value = "ixgbevf"
p._get_vnic_driver_name = mock_result2
p.multiqueue_setup()
@@ -670,7 +670,7 @@ class PktgenTestCase(unittest.TestCase):
p.client = mock_ssh.SSH.from_node()
mock_result = mock.Mock()
- mock_result.return_value = "virtio_net"
+ mock_result.return_value = "virtio_net"
p._get_vnic_driver_name = mock_result
mock_result1 = mock.Mock()
diff --git a/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py b/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
index fa9b8549d..5b15daca4 100644
--- a/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
+++ b/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
@@ -361,6 +361,12 @@ class TestNetworkServiceTestCase(unittest.TestCase):
def test___init__(self):
assert self.topology
+ def test__get_ip_flow_range_string(self):
+ self.scenario_cfg["traffic_options"]["flow"] = \
+ self._get_file_abspath("ipv4_1flow_Packets_vpe.yaml")
+ result = '152.16.100.2-152.16.100.254'
+ self.assertEqual(result, self.s._get_ip_flow_range('152.16.100.2-152.16.100.254'))
+
def test__get_ip_flow_range(self):
self.scenario_cfg["traffic_options"]["flow"] = \
self._get_file_abspath("ipv4_1flow_Packets_vpe.yaml")