summaryrefslogtreecommitdiff
path: root/scripts/cli
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cli')
-rwxr-xr-xscripts/cli/test_service_snmp.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/cli/test_service_snmp.py b/scripts/cli/test_service_snmp.py
index 983eadf4c..f4f20a3cb 100755
--- a/scripts/cli/test_service_snmp.py
+++ b/scripts/cli/test_service_snmp.py
@@ -92,7 +92,6 @@ class TestSNMPService(unittest.TestCase):
self.session.set(base_path + ['v3', 'view', 'default', 'oid', '1'])
self.session.set(base_path + ['v3', 'group', 'default', 'view', 'default'])
- self.session.commit()
# create user
self.session.set(base_path + ['v3', 'user', 'vyos', 'auth', 'plaintext-password', 'vyos12345678'])
@@ -101,6 +100,16 @@ class TestSNMPService(unittest.TestCase):
self.session.set(base_path + ['v3', 'user', 'vyos', 'privacy', 'type', 'aes'])
self.session.set(base_path + ['v3', 'user', 'vyos', 'group', 'default'])
+ self.session.commit()
+
+ # commit will alter the CLI values - check if they have been updated:
+ hashed_password = '4e52fe55fd011c9c51ae2c65f4b78ca93dcafdfe'
+ tmp = self.session.show_config(base_path + ['v3', 'user', 'vyos', 'auth', 'encrypted-password']).split()[1]
+ self.assertEqual(tmp, hashed_password)
+
+ tmp = self.session.show_config(base_path + ['v3', 'user', 'vyos', 'privacy', 'encrypted-password']).split()[1]
+ self.assertEqual(tmp, hashed_password)
+
# TODO: read in config file and check values
# Check for running process