Skip to content

Commit 5086e98

Browse files
committed
T6906: IPoE-server smoke test for start-session option
1 parent c223859 commit 5086e98

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

smoketest/scripts/cli/test_service_ipoe-server.py

+22
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,28 @@ def test_ipoe_server_static_client_ip(self):
295295
tmp = re.findall(regex, tmp)
296296
self.assertTrue(tmp)
297297

298+
def test_ipoe_server_start_session(self):
299+
start_session = 'auto'
300+
301+
# Configuration of local authentication for PPPoE server
302+
self.basic_config()
303+
self.cli_commit()
304+
305+
# Validate configuration values
306+
conf = ConfigParser(allow_no_value=True, delimiters='=', strict=False)
307+
conf.read(self._config_file)
308+
# if 'start-session' option is not set the default value is 'dhcp'
309+
self.assertIn(f'start=dhcpv4', conf['ipoe']['interface'])
310+
311+
# change 'start-session' option to 'auto'
312+
self.set(['interface', interface, 'start-session', start_session])
313+
self.cli_commit()
314+
315+
# Validate changed configuration values
316+
conf = ConfigParser(allow_no_value=True, delimiters='=', strict=False)
317+
conf.read(self._config_file)
318+
self.assertIn(f'start={start_session}', conf['ipoe']['interface'])
319+
298320
@unittest.skip("PPP is not a part of IPoE")
299321
def test_accel_ppp_options(self):
300322
pass

0 commit comments

Comments
 (0)