diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-12-28 20:07:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-28 20:07:52 +0100 |
commit | 829e76f7392e348ccc01c56e9680efb4eba80440 (patch) | |
tree | 282dac56ecfccf381fa92ad9027df6779d16ae2f /smoketest | |
parent | c1fcbba9cb45f981e5bd8decf3ebbc1e17d9fbd9 (diff) | |
parent | eeb78e842423319169b036d16601e73227dbffdd (diff) | |
download | vyos-1x-829e76f7392e348ccc01c56e9680efb4eba80440.tar.gz vyos-1x-829e76f7392e348ccc01c56e9680efb4eba80440.zip |
Merge pull request #643 from c-po/t563-webproxy
webproxy: T563: migrate from old Perl code to XML and get_config_dict()
Diffstat (limited to 'smoketest')
-rwxr-xr-x | smoketest/scripts/cli/test_service_webproxy.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/smoketest/scripts/cli/test_service_webproxy.py b/smoketest/scripts/cli/test_service_webproxy.py index dac5aa0dd..6f88a351d 100755 --- a/smoketest/scripts/cli/test_service_webproxy.py +++ b/smoketest/scripts/cli/test_service_webproxy.py @@ -127,7 +127,7 @@ class TestServiceWebProxy(unittest.TestCase): realm = 'VyOS Webproxy' ldap_base_dn = 'DC=vyos,DC=net' ldap_server = 'ldap.vyos.net' - ldap_bind_dn = 'CN=proxyuser,CN=Users,DC=example,DC=local' + ldap_bind_dn = f'CN=proxyuser,CN=Users,{ldap_base_dn}' ldap_password = 'VyOS12345' ldap_attr = 'cn' ldap_filter = '(cn=%s)' @@ -156,6 +156,7 @@ class TestServiceWebProxy(unittest.TestCase): self.session.set(base_path + ['authentication', 'ldap', 'username-attribute', ldap_attr]) self.session.set(base_path + ['authentication', 'ldap', 'filter-expression', ldap_filter]) + self.session.set(base_path + ['authentication', 'ldap', 'use-ssl']) # commit changes self.session.commit() @@ -166,8 +167,8 @@ class TestServiceWebProxy(unittest.TestCase): # Now verify LDAP settings self.assertIn(f'auth_param basic children {auth_children}', config) self.assertIn(f'auth_param basic credentialsttl {cred_ttl} minute', config) - self.assertIn(f'auth_param basic realm {realm}', config) - self.assertIn(f'auth_param basic program /usr/lib/squid/basic_ldap_auth -v 3 -b "{ldap_base_dn}" -D "{ldap_bind_dn}" -w {ldap_password} -f {ldap_filter} -u {ldap_attr} -p 389 -R -h {ldap_server}', config) + self.assertIn(f'auth_param basic realm "{realm}"', config) + self.assertIn(f'auth_param basic program /usr/lib/squid/basic_ldap_auth -v 3 -b "{ldap_base_dn}" -D "{ldap_bind_dn}" -w "{ldap_password}" -f "{ldap_filter}" -u "{ldap_attr}" -p 389 -ZZ -R -h "{ldap_server}"', config) self.assertIn(f'acl auth proxy_auth REQUIRED', config) # Check for running process |