summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-25 08:58:56 +0100
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-12-25 10:01:42 +0000
commit1902f252c4c270cf7981fecd486e293ec2182fd9 (patch)
treea764448c31a4b0a15ecb488331bca6c8c30d4b5e /smoketest/scripts/cli
parent4b3eca1e08603ed8c97d7b352e567e2e8570eac4 (diff)
downloadvyos-1x-1902f252c4c270cf7981fecd486e293ec2182fd9.tar.gz
vyos-1x-1902f252c4c270cf7981fecd486e293ec2182fd9.zip
snmp: T5855: migrate "set service lldp snmp enable" to "set service lldp snmp"
(cherry picked from commit a9201e77110ce0695e2ba879304aef41b7ac9a0c)
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_service_lldp.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/smoketest/scripts/cli/test_service_lldp.py b/smoketest/scripts/cli/test_service_lldp.py
index ee26844ab..7e30b43f5 100755
--- a/smoketest/scripts/cli/test_service_lldp.py
+++ b/smoketest/scripts/cli/test_service_lldp.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2022 VyOS maintainers and contributors
+# Copyright (C) 2022-2023 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -122,6 +122,20 @@ class TestServiceLLDP(VyOSUnitTestSHIM.TestCase):
self.assertIn(f'configure ports {interface} med location elin "{elin}"', config)
self.assertIn(f'configure system interface pattern "{interface}"', config)
+ def test_06_lldp_snmp(self):
+ self.cli_set(base_path + ['snmp'])
+
+ # verify - can not start lldp snmp without snmp beeing configured
+ with self.assertRaises(ConfigSessionError):
+ self.cli_commit()
+ self.cli_set(['service', 'snmp'])
+ self.cli_commit()
+
+ # SNMP required process to be started with -x option
+ tmp = read_file('/etc/default/lldpd')
+ self.assertIn('-x', tmp)
+
+ self.cli_delete(['service', 'snmp'])
if __name__ == '__main__':
unittest.main(verbosity=2)