diff options
author | Daniil Baturin <daniil@vyos.io> | 2023-10-08 17:14:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-08 17:14:08 +0100 |
commit | 07758d372bbc9b3633e29476afa95bc2861bee15 (patch) | |
tree | af51c0a604609874fe0a8d367fca92238d7657f5 /smoketest/scripts/cli/test_interfaces_pppoe.py | |
parent | da4006c2a784ff06cf3af3aad6adee7fef8a5330 (diff) | |
parent | ab2aeec41a2ef34730b9dc8894b184e0bf00b147 (diff) | |
download | vyos-1x-07758d372bbc9b3633e29476afa95bc2861bee15.tar.gz vyos-1x-07758d372bbc9b3633e29476afa95bc2861bee15.zip |
Merge pull request #2347 from c-po/equuleus
pppoe: T5630: allow to specify MRU in addition to already configurable MTU (backport #2335)
Diffstat (limited to 'smoketest/scripts/cli/test_interfaces_pppoe.py')
-rwxr-xr-x | smoketest/scripts/cli/test_interfaces_pppoe.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_pppoe.py b/smoketest/scripts/cli/test_interfaces_pppoe.py index 8dcac4d7d..2aaccbb13 100755 --- a/smoketest/scripts/cli/test_interfaces_pppoe.py +++ b/smoketest/scripts/cli/test_interfaces_pppoe.py @@ -58,11 +58,13 @@ class PPPoEInterfaceTest(VyOSUnitTestSHIM.TestCase): user = 'VyOS-user-' + interface passwd = 'VyOS-passwd-' + interface mtu = '1400' + mru = '1300' self.cli_set(base_path + [interface, 'authentication', 'user', user]) self.cli_set(base_path + [interface, 'authentication', 'password', passwd]) self.cli_set(base_path + [interface, 'default-route', 'auto']) self.cli_set(base_path + [interface, 'mtu', mtu]) + self.cli_set(base_path + [interface, 'mru', '9000']) self.cli_set(base_path + [interface, 'no-peer-dns']) # check validate() - a source-interface is required @@ -70,8 +72,13 @@ class PPPoEInterfaceTest(VyOSUnitTestSHIM.TestCase): self.cli_commit() self.cli_set(base_path + [interface, 'source-interface', self._source_interface]) - # commit changes - self.cli_commit() + # check validate() - MRU needs to be less or equal then MTU + with self.assertRaises(ConfigSessionError): + self.cli_commit() + self.cli_set(base_path + [interface, 'mru', mru]) + + # commit changes + self.cli_commit() # verify configuration file(s) for interface in self._interfaces: @@ -80,6 +87,8 @@ class PPPoEInterfaceTest(VyOSUnitTestSHIM.TestCase): tmp = get_config_value(interface, 'mtu')[1] self.assertEqual(tmp, mtu) + tmp = get_config_value(interface, 'mru')[1] + self.assertEqual(tmp, mru) tmp = get_config_value(interface, 'user')[1].replace('"', '') self.assertEqual(tmp, user) tmp = get_config_value(interface, 'password')[1].replace('"', '') |