summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-17 21:20:22 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-17 21:20:26 +0100
commit0078259e5eecee5439e0ef013b64235e4db91c76 (patch)
treee037027892542874269813107bd2f66b64aae11c /scripts
parent36629c88ccdf856a79627a710ff34a6f5a47cee4 (diff)
downloadvyos-1x-0078259e5eecee5439e0ef013b64235e4db91c76.tar.gz
vyos-1x-0078259e5eecee5439e0ef013b64235e4db91c76.zip
ssh: get_config_value() should return str not list
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/cli/test_service_ssh.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/cli/test_service_ssh.py b/scripts/cli/test_service_ssh.py
index f0ad2e565..40e1433b2 100755
--- a/scripts/cli/test_service_ssh.py
+++ b/scripts/cli/test_service_ssh.py
@@ -28,7 +28,8 @@ base_path = ['service', 'ssh']
def get_config_value(key):
tmp = read_file(SSHD_CONF)
- return re.findall(r'\n?{}\s+(.*)'.format(key), tmp)
+ tmp = re.findall(r'\n?{}\s+(.*)'.format(key), tmp)
+ return tmp[0]
class TestServiceSSH(unittest.TestCase):
@@ -53,11 +54,11 @@ class TestServiceSSH(unittest.TestCase):
self.session.commit()
# Check configured port
- port = get_config_value('Port')[0]
+ port = get_config_value('Port')
self.assertTrue("2222" in port)
# Check DNS usage
- dns = get_config_value('UseDNS')[0]
+ dns = get_config_value('UseDNS')
self.assertTrue("no" in dns)
# Check for running process