diff options
Diffstat (limited to 'smoketest/scripts/cli/test_qos.py')
-rwxr-xr-x | smoketest/scripts/cli/test_qos.py | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/smoketest/scripts/cli/test_qos.py b/smoketest/scripts/cli/test_qos.py index d1fa3d07b..0092473d6 100755 --- a/smoketest/scripts/cli/test_qos.py +++ b/smoketest/scripts/cli/test_qos.py @@ -130,7 +130,7 @@ class TestQoS(VyOSUnitTestSHIM.TestCase): def test_03_fair_queue(self): hash_interval = 10 - queue_limit = 50 + queue_limit = 5 policy_type = 'fair-queue' first = True @@ -150,13 +150,13 @@ class TestQoS(VyOSUnitTestSHIM.TestCase): self.cli_set(base_path + ['policy', policy_type, policy_name, 'queue-limit', str(queue_limit)]) hash_interval += 1 - queue_limit += 10 + queue_limit += 1 # commit changes self.cli_commit() hash_interval = 10 - queue_limit = 50 + queue_limit = 5 for interface in self._interfaces: tmp = get_tc_qdisc_json(interface) @@ -165,7 +165,7 @@ class TestQoS(VyOSUnitTestSHIM.TestCase): self.assertEqual(queue_limit, tmp['options']['limit']) hash_interval += 1 - queue_limit += 10 + queue_limit += 1 def test_04_fq_codel(self): policy_type = 'fq-codel' @@ -222,8 +222,8 @@ class TestQoS(VyOSUnitTestSHIM.TestCase): # results in: tc -j qdisc show dev eth0 # [{"kind":"fq_codel","handle":"8046:","root":true,"refcnt":3,"options":{"limit":2048,"flows":512, # "quantum":1500,"target":4999,"interval":99999,"memory_limit":33554432,"drop_batch":64}}] - self.assertEqual(interval *1000 -1, tmp['options']['interval']) - self.assertEqual(target *1000 -1, tmp['options']['target']) + self.assertAlmostEqual(tmp['options']['interval'], interval *1000, delta=1) + self.assertAlmostEqual(tmp['options']['target'], target *1000 -1, delta=1) codel_quantum += 10 flows += 2 @@ -234,13 +234,13 @@ class TestQoS(VyOSUnitTestSHIM.TestCase): def test_05_limiter(self): qos_config = { '1' : { - 'bandwidth' : '100', + 'bandwidth' : '1000000', 'match4' : { 'ssh' : { 'dport' : '22', }, }, }, '2' : { - 'bandwidth' : '100', + 'bandwidth' : '1000000', 'match6' : { 'ssh' : { 'dport' : '22', }, }, @@ -260,7 +260,8 @@ class TestQoS(VyOSUnitTestSHIM.TestCase): first = False self.cli_set(base_path + ['interface', interface, 'ingress', policy_name]) - + # set default bandwidth parameter for all remaining connections + self.cli_set(base_path + ['policy', 'limiter', policy_name, 'default', 'bandwidth', '500000']) for qos_class, qos_class_config in qos_config.items(): qos_class_base = base_path + ['policy', 'limiter', policy_name, 'class', qos_class] @@ -282,8 +283,6 @@ class TestQoS(VyOSUnitTestSHIM.TestCase): # commit changes self.cli_commit() - self.skipTest('iproute2 bug - invalid JSON') - for interface in self._interfaces: for filter in get_tc_filter_json(interface, 'ingress'): # bail out early if filter has no attached action |