diff options
author | Nataliia Solomko <81954790+natali-rs1985@users.noreply.github.com> | 2024-04-12 12:25:21 +0300 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-04-12 10:14:38 +0000 |
commit | 2aa9010d27eb3627e340ec55f4fdede346759ad4 (patch) | |
tree | 3b8d55f175dfbbd5a77eb7bd8483ecc6bafdb702 /smoketest | |
parent | 41ad411e11f608a7ded9bf0ce9cbffad8467aa5a (diff) | |
download | vyos-1x-2aa9010d27eb3627e340ec55f4fdede346759ad4.tar.gz vyos-1x-2aa9010d27eb3627e340ec55f4fdede346759ad4.zip |
pppoe-server: T6141: T5364: PPPoE-server add pado-delay without sessions fails (#3296)
(cherry picked from commit 6d8336f5ad2d9c4e0f12b54681db2924d6998d2d)
Diffstat (limited to 'smoketest')
-rwxr-xr-x | smoketest/scripts/cli/test_service_pppoe-server.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_pppoe-server.py b/smoketest/scripts/cli/test_service_pppoe-server.py index d7c7aa164..5a48b1f58 100755 --- a/smoketest/scripts/cli/test_service_pppoe-server.py +++ b/smoketest/scripts/cli/test_service_pppoe-server.py @@ -148,6 +148,28 @@ class TestServicePPPoEServer(BasicAccelPPPTest.TestCase): tmp = ','.join(vlans) self.assertIn(f'vlan-mon={interface},{tmp}', config) + def test_pppoe_server_pado_delay(self): + delay_without_sessions = '10' + delays = {'20': '200', '30': '300'} + + self.basic_config() + + self.set(['pado-delay', delay_without_sessions]) + self.cli_commit() + + conf = ConfigParser(allow_no_value=True, delimiters='=') + conf.read(self._config_file) + self.assertEqual(conf['pppoe']['pado-delay'], delay_without_sessions) + + for delay, sessions in delays.items(): + self.set(['pado-delay', delay, 'sessions', sessions]) + self.cli_commit() + + conf = ConfigParser(allow_no_value=True, delimiters='=') + conf.read(self._config_file) + + self.assertEqual(conf['pppoe']['pado-delay'], '10,20:200,-1:300') + if __name__ == '__main__': unittest.main(verbosity=2) |