summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2009-08-10 16:24:10 -0400
committerJason Gerard DeRose <jderose@redhat.com>2009-08-10 16:38:42 -0600
commitc781e8a57d3d05fa07729dbccff07bc1fab9d8e8 (patch)
treea34808ae88abc0a6c61414ca9eda9a094736ba6b /tests
parentdbeb409ebd0396ce58102b118452c6e4c6802937 (diff)
downloadfreeipa-c781e8a57d3d05fa07729dbccff07bc1fab9d8e8.tar.gz
freeipa-c781e8a57d3d05fa07729dbccff07bc1fab9d8e8.tar.xz
freeipa-c781e8a57d3d05fa07729dbccff07bc1fab9d8e8.zip
Add a new objectclass, ipaObject, that will add a UUID to many IPA objects
ipaObject is defined as an auxiliary objectclass so it is up to the plugin author to ensure that the objectclass is included an a UUID generated. ipaUniqueId is a MUST attribute so if you include the objectclass you must ensure that the uuid is generated. This also fixes up some unrelated unit test failures.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_xmlrpc/test_group_plugin.py13
-rw-r--r--tests/test_xmlrpc/test_host_plugin.py1
-rw-r--r--tests/test_xmlrpc/test_hostgroup_plugin.py7
-rw-r--r--tests/test_xmlrpc/test_netgroup_plugin.py27
-rw-r--r--tests/test_xmlrpc/test_passwd_plugin.py1
-rw-r--r--tests/test_xmlrpc/test_rolegroup_plugin.py7
-rw-r--r--tests/test_xmlrpc/test_service_plugin.py1
-rw-r--r--tests/test_xmlrpc/test_taskgroup_plugin.py3
-rw-r--r--tests/test_xmlrpc/test_user_plugin.py1
9 files changed, 35 insertions, 26 deletions
diff --git a/tests/test_xmlrpc/test_group_plugin.py b/tests/test_xmlrpc/test_group_plugin.py
index d1024fcac..44baba3c8 100644
--- a/tests/test_xmlrpc/test_group_plugin.py
+++ b/tests/test_xmlrpc/test_group_plugin.py
@@ -45,6 +45,7 @@ class test_group(XMLRPC_test):
assert res
assert_attr_equal(res, 'description', self.description)
assert_attr_equal(res, 'cn', self.cn)
+ assert_attr_equal(res, 'objectclass', 'ipaobject')
def test_2_group_add(self):
"""
@@ -136,24 +137,24 @@ class test_group(XMLRPC_test):
assert_attr_equal(res, 'cn', self.cn)
assert res.get('gidnumber', '')
- def test_9_group_del_member(self):
+ def test_9_group_remove_member(self):
"""
- Test the `xmlrpc.group_del_member` method.
+ Test the `xmlrpc.group_remove_member` method.
"""
kw = {}
kw['groups'] = self.cn2
- (total, failed, res) = api.Command['group_del_member'](self.cn, **kw)
+ (total, failed, res) = api.Command['group_remove_member'](self.cn, **kw)
assert res
assert total == 1
- def test_a_group_del_member(self):
+ def test_a_group_remove_member(self):
"""
- Test the `xmlrpc.group_del_member` method with non-member
+ Test the `xmlrpc.group_remove_member` method with non-member
"""
kw = {}
kw['groups'] = u'notfound'
# an error isn't thrown, the list of failed members is returned
- (total, failed, res) = api.Command['group_del_member'](self.cn, **kw)
+ (total, failed, res) = api.Command['group_remove_member'](self.cn, **kw)
assert total == 0
assert 'notfound' in failed
diff --git a/tests/test_xmlrpc/test_host_plugin.py b/tests/test_xmlrpc/test_host_plugin.py
index e64ba7aec..38d1ff73e 100644
--- a/tests/test_xmlrpc/test_host_plugin.py
+++ b/tests/test_xmlrpc/test_host_plugin.py
@@ -45,6 +45,7 @@ class test_host(XMLRPC_test):
assert_attr_equal(res, 'description', self.description)
assert_attr_equal(res, 'fqdn', self.fqdn)
assert_attr_equal(res, 'localityname', self.localityname)
+ assert_attr_equal(res, 'objectclass', 'ipaobject')
def test_2_host_show(self):
"""
diff --git a/tests/test_xmlrpc/test_hostgroup_plugin.py b/tests/test_xmlrpc/test_hostgroup_plugin.py
index 6e26e0992..0aa685d79 100644
--- a/tests/test_xmlrpc/test_hostgroup_plugin.py
+++ b/tests/test_xmlrpc/test_hostgroup_plugin.py
@@ -47,6 +47,7 @@ class test_hostgroup(XMLRPC_test):
assert res
assert_attr_equal(res, 'description', self.description)
assert_attr_equal(res, 'cn', self.cn)
+ assert_attr_equal(res, 'objectclass', 'ipaobject')
def test_2_host_add(self):
"""
@@ -101,13 +102,13 @@ class test_hostgroup(XMLRPC_test):
assert_attr_equal(res, 'description', newdesc)
assert_attr_equal(res, 'cn', self.cn)
- def test_7_hostgroup_del_member(self):
+ def test_7_hostgroup_remove_member(self):
"""
- Test the `xmlrpc.hostgroup_del_member` method.
+ Test the `xmlrpc.hostgroup_remove_member` method.
"""
kw = {}
kw['hosts'] = self.host_fqdn
- (total, failed, res) = api.Command['hostgroup_del_member'](self.cn, **kw)
+ (total, failed, res) = api.Command['hostgroup_remove_member'](self.cn, **kw)
assert res
assert res[1].get('member', []) == []
diff --git a/tests/test_xmlrpc/test_netgroup_plugin.py b/tests/test_xmlrpc/test_netgroup_plugin.py
index b447e0174..a7543a251 100644
--- a/tests/test_xmlrpc/test_netgroup_plugin.py
+++ b/tests/test_xmlrpc/test_netgroup_plugin.py
@@ -164,7 +164,7 @@ class test_netgroup(XMLRPC_test):
"""
Test the `xmlrpc.netgroup_show` method.
"""
- (dn, res) = api.Command['netgroup_show'](self.ng_cn)
+ (dn, res) = api.Command['netgroup_show'](self.ng_cn, all=True)
assert res
assert_attr_equal(res, 'description', self.ng_description)
assert_attr_equal(res, 'cn', self.ng_cn)
@@ -172,6 +172,7 @@ class test_netgroup(XMLRPC_test):
assert_is_member(res, 'cn=%s' % self.hg_cn)
assert_is_member(res, 'uid=%s' % self.user_uid)
assert_is_member(res, 'cn=%s' % self.group_cn)
+ assert_attr_equal(res, 'objectclass', 'ipaobject')
def test_7_netgroup_find(self):
"""
@@ -198,56 +199,56 @@ class test_netgroup(XMLRPC_test):
assert_attr_equal(res, 'description', newdesc)
assert_attr_equal(res, 'cn', self.ng_cn)
- def test_9_netgroup_del_member(self):
+ def test_9_netgroup_remove_member(self):
"""
- Test the `xmlrpc.hostgroup_del_member` method.
+ Test the `xmlrpc.hostgroup_remove_member` method.
"""
kw = {}
kw['hosts'] = self.host_fqdn
- (total, failed, res) = api.Command['netgroup_del_member'](self.ng_cn, **kw)
+ (total, failed, res) = api.Command['netgroup_remove_member'](self.ng_cn, **kw)
assert total == 1
kw = {}
kw['hostgroups'] = self.hg_cn
- (total, failed, res) = api.Command['netgroup_del_member'](self.ng_cn, **kw)
+ (total, failed, res) = api.Command['netgroup_remove_member'](self.ng_cn, **kw)
assert total == 1
kw = {}
kw['users'] = self.user_uid
- (total, failed, res) = api.Command['netgroup_del_member'](self.ng_cn, **kw)
+ (total, failed, res) = api.Command['netgroup_remove_member'](self.ng_cn, **kw)
assert total == 1
kw = {}
kw['groups'] = self.group_cn
- (total, failed, res) = api.Command['netgroup_del_member'](self.ng_cn, **kw)
+ (total, failed, res) = api.Command['netgroup_remove_member'](self.ng_cn, **kw)
assert total == 1
- def test_a_netgroup_del_member(self):
+ def test_a_netgroup_remove_member(self):
"""
- Test the `xmlrpc.netgroup_del_member` method again to test not found.
+ Test the `xmlrpc.netgroup_remove_member` method again to test not found.
"""
kw = {}
kw['hosts'] = self.host_fqdn
- (total, failed, res) = api.Command['netgroup_del_member'](self.ng_cn, **kw)
+ (total, failed, res) = api.Command['netgroup_remove_member'](self.ng_cn, **kw)
assert total == 0
assert self.host_fqdn in failed
kw = {}
kw['hostgroups'] = self.hg_cn
- (total, failed, res) = api.Command['netgroup_del_member'](self.ng_cn, **kw)
+ (total, failed, res) = api.Command['netgroup_remove_member'](self.ng_cn, **kw)
assert total == 0
assert self.hg_cn in failed
kw = {}
kw['users'] = self.user_uid
(dn, res) = api.Command['netgroup_show'](self.ng_cn, all=True)
- (total, failed, res) = api.Command['netgroup_del_member'](self.ng_cn, **kw)
+ (total, failed, res) = api.Command['netgroup_remove_member'](self.ng_cn, **kw)
assert total == 0
assert self.user_uid in failed
kw = {}
kw['groups'] = self.group_cn
- (total, failed, res) = api.Command['netgroup_del_member'](self.ng_cn, **kw)
+ (total, failed, res) = api.Command['netgroup_remove_member'](self.ng_cn, **kw)
assert total == 0
assert self.group_cn in failed
diff --git a/tests/test_xmlrpc/test_passwd_plugin.py b/tests/test_xmlrpc/test_passwd_plugin.py
index 9be180192..21fb743f9 100644
--- a/tests/test_xmlrpc/test_passwd_plugin.py
+++ b/tests/test_xmlrpc/test_passwd_plugin.py
@@ -47,6 +47,7 @@ class test_passwd(XMLRPC_test):
assert_attr_equal(res, 'sn', self.sn)
assert_attr_equal(res, 'uid', self.uid)
assert_attr_equal(res, 'homedirectory', self.home)
+ assert_attr_equal(res, 'objectclass', 'ipaobject')
def test_2_set_passwd(self):
"""
diff --git a/tests/test_xmlrpc/test_rolegroup_plugin.py b/tests/test_xmlrpc/test_rolegroup_plugin.py
index 9a93a926b..d001c90ff 100644
--- a/tests/test_xmlrpc/test_rolegroup_plugin.py
+++ b/tests/test_xmlrpc/test_rolegroup_plugin.py
@@ -46,6 +46,7 @@ class test_rolegroup(XMLRPC_test):
assert res
assert_attr_equal(res, 'description', self.description)
assert_attr_equal(res, 'cn', self.cn)
+ assert_attr_equal(res, 'objectclass', 'ipaobject')
def test_2_add_group(self):
"""
@@ -102,13 +103,13 @@ class test_rolegroup(XMLRPC_test):
assert_attr_equal(res, 'description', newdesc)
assert_attr_equal(res, 'cn', self.cn)
- def test_7_rolegroup_del_member(self):
+ def test_7_rolegroup_remove_member(self):
"""
- Test the `xmlrpc.rolegroup_del_member` method.
+ Test the `xmlrpc.rolegroup_remove_member` method.
"""
kw = {}
kw['groups'] = self.rolegroup_cn
- (total, failed, res) = api.Command['rolegroup_del_member'](self.cn, **kw)
+ (total, failed, res) = api.Command['rolegroup_remove_member'](self.cn, **kw)
assert total == 1
def test_8_rolegroup_del(self):
diff --git a/tests/test_xmlrpc/test_service_plugin.py b/tests/test_xmlrpc/test_service_plugin.py
index 7a7608a80..9eede38ba 100644
--- a/tests/test_xmlrpc/test_service_plugin.py
+++ b/tests/test_xmlrpc/test_service_plugin.py
@@ -42,6 +42,7 @@ class test_service(XMLRPC_test):
(dn, res) = api.Command['service_add'](**self.kw)
assert res
assert_attr_equal(res, 'krbprincipalname', self.principal)
+ assert_attr_equal(res, 'objectclass', 'ipaobject')
def test_2_service_add(self):
"""
diff --git a/tests/test_xmlrpc/test_taskgroup_plugin.py b/tests/test_xmlrpc/test_taskgroup_plugin.py
index 9cede858c..bae6db533 100644
--- a/tests/test_xmlrpc/test_taskgroup_plugin.py
+++ b/tests/test_xmlrpc/test_taskgroup_plugin.py
@@ -49,6 +49,7 @@ class test_taskgroup(XMLRPC_test):
assert res
assert_attr_equal(res, 'description', self.description)
assert_attr_equal(res, 'cn', self.cn)
+ assert_attr_equal(res, 'objectclass', 'ipaobject')
def test_2_add_rolegroup(self):
"""
@@ -124,7 +125,7 @@ class test_taskgroup(XMLRPC_test):
"""
kw = {}
kw['groups'] = self.taskgroup_cn
- (total, failed, res) = api.Command['taskgroup_del_member'](self.cn, **kw)
+ (total, failed, res) = api.Command['taskgroup_remove_member'](self.cn, **kw)
assert total == 1
def test_9_taskgroup_del(self):
diff --git a/tests/test_xmlrpc/test_user_plugin.py b/tests/test_xmlrpc/test_user_plugin.py
index 3bc8177a3..efe48d843 100644
--- a/tests/test_xmlrpc/test_user_plugin.py
+++ b/tests/test_xmlrpc/test_user_plugin.py
@@ -48,6 +48,7 @@ class test_user(XMLRPC_test):
assert_attr_equal(res, 'sn', self.sn)
assert_attr_equal(res, 'uid', self.uid)
assert_attr_equal(res, 'homedirectory', self.home)
+ assert_attr_equal(res, 'objectclass', 'ipaobject')
def test_2_user_add(self):
"""