summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-05-30 17:29:43 +0200
committerGitHub <noreply@github.com>2024-05-30 17:29:43 +0200
commit1220c66589438da42db6a9c2334253024a7e68f2 (patch)
tree7bfc5ccbb5155ce2ed012a66d8b9cd5d6cd57bc9 /smoketest/scripts
parente26fcfb0bb254deea26d9cf3c9707552eafcafe9 (diff)
parentcbb05311454bfe04e40a8c6bb2387e05d411776f (diff)
downloadvyos-1x-1220c66589438da42db6a9c2334253024a7e68f2.tar.gz
vyos-1x-1220c66589438da42db6a9c2334253024a7e68f2.zip
Merge pull request #3558 from vyos/mergify/bp/sagitta/pr-3510
T4576: Accel-ppp logging level configuration (backport #3510)
Diffstat (limited to 'smoketest/scripts')
-rw-r--r--smoketest/scripts/cli/base_accel_ppp_test.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/base_accel_ppp_test.py b/smoketest/scripts/cli/base_accel_ppp_test.py
index ab723e707..212dc58ab 100644
--- a/smoketest/scripts/cli/base_accel_ppp_test.py
+++ b/smoketest/scripts/cli/base_accel_ppp_test.py
@@ -628,3 +628,21 @@ delegate={delegate_2_prefix},{delegate_mask},name={pool_name}"""
self.assertEqual(conf['connlimit']['limit'], limits)
self.assertEqual(conf['connlimit']['burst'], burst)
self.assertEqual(conf['connlimit']['timeout'], timeout)
+
+ def test_accel_log_level(self):
+ self.basic_config()
+ self.cli_commit()
+
+ # check default value
+ conf = ConfigParser(allow_no_value=True)
+ conf.read(self._config_file)
+ self.assertEqual(conf['log']['level'], '3')
+
+ for log_level in range(0, 5):
+ self.set(['log', 'level', str(log_level)])
+ self.cli_commit()
+ # Validate configuration values
+ conf = ConfigParser(allow_no_value=True)
+ conf.read(self._config_file)
+
+ self.assertEqual(conf['log']['level'], str(log_level))