summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_xmlrpc/test_host_plugin.py10
-rw-r--r--tests/test_xmlrpc/test_service_plugin.py14
2 files changed, 23 insertions, 1 deletions
diff --git a/tests/test_xmlrpc/test_host_plugin.py b/tests/test_xmlrpc/test_host_plugin.py
index 7068d9a3..8f5bd7cf 100644
--- a/tests/test_xmlrpc/test_host_plugin.py
+++ b/tests/test_xmlrpc/test_host_plugin.py
@@ -673,9 +673,17 @@ class test_host(Declarative):
dict(
desc='Delete the current host (master?) %s should be caught' % api.env.host,
command=('host_del', [api.env.host], {}),
- expected=errors.ValidationError(name='fqdn', error='An IPA master host cannot be deleted'),
+ expected=errors.ValidationError(name='fqdn', error='An IPA master host cannot be deleted or disabled'),
),
+
+ dict(
+ desc='Disable the current host (master?) %s should be caught' % api.env.host,
+ command=('host_disable', [api.env.host], {}),
+ expected=errors.ValidationError(name='fqdn', error='An IPA master host cannot be deleted or disabled'),
+ ),
+
+
dict(
desc='Test that validation is enabled on adds',
command=('host_add', [invalidfqdn1], {}),
diff --git a/tests/test_xmlrpc/test_service_plugin.py b/tests/test_xmlrpc/test_service_plugin.py
index 7eccd206..501cf024 100644
--- a/tests/test_xmlrpc/test_service_plugin.py
+++ b/tests/test_xmlrpc/test_service_plugin.py
@@ -487,4 +487,18 @@ class test_service(Declarative):
),
+ dict(
+ desc='Disable the current host (master?) %s HTTP service, should be caught' % api.env.host,
+ command=('service_disable', ['HTTP/%s' % api.env.host], {}),
+ expected=errors.ValidationError(name='principal', error='This principal is required by the IPA master'),
+ ),
+
+
+ dict(
+ desc='Disable the current host (master?) %s ldap service, should be caught' % api.env.host,
+ command=('service_disable', ['ldap/%s' % api.env.host], {}),
+ expected=errors.ValidationError(name='principal', error='This principal is required by the IPA master'),
+ ),
+
+
]