summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_service_webproxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'smoketest/scripts/cli/test_service_webproxy.py')
-rwxr-xr-xsmoketest/scripts/cli/test_service_webproxy.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/smoketest/scripts/cli/test_service_webproxy.py b/smoketest/scripts/cli/test_service_webproxy.py
index c98d47c41..01716944d 100755
--- a/smoketest/scripts/cli/test_service_webproxy.py
+++ b/smoketest/scripts/cli/test_service_webproxy.py
@@ -136,17 +136,25 @@ class TestServiceWebProxy(unittest.TestCase):
self.session.set(base_path + ['authentication', 'children', auth_children])
self.session.set(base_path + ['authentication', 'credentials-ttl', cred_ttl])
- # check validate() - LDAP authentication is enabled, but server not set
- self.session.set(base_path + ['authentication', 'method', 'ldap'])
self.session.set(base_path + ['authentication', 'realm', realm])
+ self.session.set(base_path + ['authentication', 'method', 'ldap'])
+ # check validate() - LDAP authentication is enabled, but server not set
with self.assertRaises(ConfigSessionError):
self.session.commit()
-
- self.session.set(base_path + ['authentication', 'ldap', 'base-dn', ldap_base_dn])
self.session.set(base_path + ['authentication', 'ldap', 'server', ldap_server])
+
+ # check validate() - LDAP password can not be set when bind-dn is not define
self.session.set(base_path + ['authentication', 'ldap', 'password', ldap_password])
- self.session.set(base_path + ['authentication', 'ldap', 'username-attribute', ldap_attr])
+ with self.assertRaises(ConfigSessionError):
+ self.session.commit()
self.session.set(base_path + ['authentication', 'ldap', 'bind-dn', ldap_bind_dn])
+
+ # check validate() - LDAP base-dn must be set
+ with self.assertRaises(ConfigSessionError):
+ self.session.commit()
+ self.session.set(base_path + ['authentication', 'ldap', 'base-dn', ldap_base_dn])
+
+ self.session.set(base_path + ['authentication', 'ldap', 'username-attribute', ldap_attr])
self.session.set(base_path + ['authentication', 'ldap', 'filter-expression', ldap_filter])
# commit changes