summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-12 20:30:44 +0200
committerGitHub <noreply@github.com>2024-04-12 20:30:44 +0200
commit799864a177e429c782c4fa2ffc72b0a10cd23a5e (patch)
treec1723ba96d0a419fa21fb8078917059369ebdf3b /smoketest
parent0a883649f7a181883a8d97d6ee82ce27856d6e13 (diff)
parent2aa9010d27eb3627e340ec55f4fdede346759ad4 (diff)
downloadvyos-1x-799864a177e429c782c4fa2ffc72b0a10cd23a5e.tar.gz
vyos-1x-799864a177e429c782c4fa2ffc72b0a10cd23a5e.zip
Merge pull request #3299 from vyos/mergify/bp/sagitta/pr-3296
pppoe-server: T6141: T5364: PPPoE-server add pado-delay without sessions fails (backport #3296)
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_service_pppoe-server.py22
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)