summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2012-03-19 10:16:49 -0400
committerMartin Kosek <mkosek@redhat.com>2012-03-19 16:09:09 +0100
commit35521ad6bb92057d5faefa2059d7d800bebb1af0 (patch)
treea9a0473fbb2eefada28c6a0adba5004afff82dae /tests/test_xmlrpc
parent95df14634663f5ef57875b8ce1e54ca14c111a75 (diff)
downloadfreeipa-35521ad6bb92057d5faefa2059d7d800bebb1af0.tar.gz
freeipa-35521ad6bb92057d5faefa2059d7d800bebb1af0.tar.xz
freeipa-35521ad6bb92057d5faefa2059d7d800bebb1af0.zip
Don't allow hosts and services of IPA masters to be disabled.
https://fedorahosted.org/freeipa/ticket/2487
Diffstat (limited to 'tests/test_xmlrpc')
-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 7068d9a3f..8f5bd7cf3 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 7eccd2066..501cf024e 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'),
+ ),
+
+
]