summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorOleksandr Kuchmystyi <o.kuchmystyi@vyos.io>2025-10-24 14:48:42 +0300
committerOleksandr Kuchmystyi <o.kuchmystyi@vyos.io>2025-10-24 14:48:42 +0300
commit34ce34f1680a5c34a68aa7a9774107e7bb2b7610 (patch)
tree94ed873f180c340abc64c0ce9d9ee387697ab485 /smoketest/scripts/cli
parentc284938df61b5e970dd13cde03e0693254e89211 (diff)
downloadvyos-1x-34ce34f1680a5c34a68aa7a9774107e7bb2b7610.tar.gz
vyos-1x-34ce34f1680a5c34a68aa7a9774107e7bb2b7610.zip
syslog: T4251: Fix TLS enablement logic for syslog
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_system_syslog.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/smoketest/scripts/cli/test_system_syslog.py b/smoketest/scripts/cli/test_system_syslog.py
index 4f3164bde..b04c3ea58 100755
--- a/smoketest/scripts/cli/test_system_syslog.py
+++ b/smoketest/scripts/cli/test_system_syslog.py
@@ -305,12 +305,17 @@ class TestRSYSLOGService(VyOSUnitTestSHIM.TestCase):
self._set_tls_certificates()
rhosts = {
+ '172.10.0.1': {
+ 'facility': {'all': {'level': 'debug'}},
+ 'port': '6514',
+ 'protocol': 'udp',
+ 'tls': {},
+ },
'172.10.0.2': {
'facility': {'all': {'level': 'debug'}},
'port': '6514',
'protocol': 'udp',
'tls': {
- 'enable': True,
'auth-mode': 'anon',
},
},
@@ -319,7 +324,6 @@ class TestRSYSLOGService(VyOSUnitTestSHIM.TestCase):
'port': '6514',
'protocol': 'tcp',
'tls': {
- 'enable': True,
'ca-certificate': ca_cert_name,
'auth-mode': 'certvalid',
},
@@ -329,7 +333,6 @@ class TestRSYSLOGService(VyOSUnitTestSHIM.TestCase):
'port': '6514',
'protocol': 'tcp',
'tls': {
- 'enable': True,
'ca-certificate': ca_cert_name,
'certificate': client_cert_name,
'auth-mode': 'fingerprint',
@@ -341,7 +344,6 @@ class TestRSYSLOGService(VyOSUnitTestSHIM.TestCase):
'port': '6514',
'protocol': 'tcp',
'tls': {
- 'enable': True,
'ca-certificate': ca_cert_name,
'certificate': client_cert_name,
'auth-mode': 'name',
@@ -368,11 +370,11 @@ class TestRSYSLOGService(VyOSUnitTestSHIM.TestCase):
self.cli_set(remote_base + ['protocol'], value=protocol)
tls = remote_options['tls']
- for key, value in tls.items():
- if key == 'enable':
- self.cli_set(remote_base + ['tls', 'enable'])
- else:
+ if tls:
+ for key, value in tls.items():
self.cli_set(remote_base + ['tls', key], value=value)
+ else:
+ self.cli_set(remote_base + ['tls'])
self.cli_commit()
@@ -414,6 +416,9 @@ class TestRSYSLOGService(VyOSUnitTestSHIM.TestCase):
value = tls['permitted-peers']
self.assertIn(f'StreamDriverPermittedPeers="{value}"', config)
+ if not tls:
+ self.assertIn(f'StreamDriverAuthMode="anon"', config)
+
def test_vrf_source_address(self):
rhosts = {
'169.254.0.10': { },