summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-12-16 11:42:47 +0000
committerGitHub <noreply@github.com>2024-12-16 11:42:47 +0000
commitd08a51ab1011f926f897e288d6d8946a8ff72674 (patch)
tree853ff9b3f56d9a58b17e0a1ab9a93337783b9ffe /smoketest/scripts
parent221b384ff0096f07b96f13d1a5433e0b49c15846 (diff)
parenta4bf498d77b5cd2db00aae226b10a60d9b1fba23 (diff)
downloadvyos-1x-d08a51ab1011f926f897e288d6d8946a8ff72674.tar.gz
vyos-1x-d08a51ab1011f926f897e288d6d8946a8ff72674.zip
Merge pull request #4219 from natali-rs1985/T6628
ipoe_server: T6628: Add option to assign static IP address to end users with local auth
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-xsmoketest/scripts/cli/test_service_ipoe-server.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_ipoe-server.py b/smoketest/scripts/cli/test_service_ipoe-server.py
index be03179bf..ab0898d17 100755
--- a/smoketest/scripts/cli/test_service_ipoe-server.py
+++ b/smoketest/scripts/cli/test_service_ipoe-server.py
@@ -260,6 +260,41 @@ delegate={delegate_2_prefix},{delegate_mask},name={pool_name}"""
tmp = ','.join(vlans)
self.assertIn(f'{interface},{tmp}', conf['ipoe']['vlan-mon'])
+ def test_ipoe_server_static_client_ip(self):
+ mac_address = '08:00:27:2f:d8:06'
+ ip_address = '192.0.2.100'
+
+ # Test configuration of local authentication for PPPoE server
+ self.basic_config()
+ # Rewrite authentication from basic_config
+ self.set(
+ [
+ 'authentication',
+ 'interface',
+ interface,
+ 'mac',
+ mac_address,
+ 'static-ip',
+ ip_address,
+ ]
+ )
+ self.set(['authentication', 'mode', 'local'])
+ # commit changes
+ self.cli_commit()
+
+ # Validate configuration values
+ conf = ConfigParser(allow_no_value=True, delimiters='=', strict=False)
+ conf.read(self._config_file)
+
+ # basic verification
+ self.verify(conf)
+
+ # check local users
+ tmp = cmd(f'sudo cat {self._chap_secrets}')
+ regex = f'{interface}\s+\*\s+{mac_address}\s+{ip_address}'
+ tmp = re.findall(regex, tmp)
+ self.assertTrue(tmp)
+
@unittest.skip("PPP is not a part of IPoE")
def test_accel_ppp_options(self):
pass