diff options
author | Martin Kosek <mkosek@redhat.com> | 2011-08-01 16:41:28 +0200 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-08-18 20:35:12 -0400 |
commit | d28f1c3b7cca50166444c7110e914f1efd4f779a (patch) | |
tree | 4ff6abc1f2a7155220a9c5c9d93ea33542393622 /tests | |
parent | 1ec531469ee0cf91ed9e150307d93e5ab12aa2a6 (diff) | |
download | freeipa-d28f1c3b7cca50166444c7110e914f1efd4f779a.tar.gz freeipa-d28f1c3b7cca50166444c7110e914f1efd4f779a.tar.xz freeipa-d28f1c3b7cca50166444c7110e914f1efd4f779a.zip |
Fix automountkey-mod
Fix automountkey-mod so that automountkey attribute is correctly
updated. Add this test case to the unit tests.
Make automountkey required for automountkey-mod, otherwise it would
cause internal server error.
Make --newinfo optional so that automountkey may be just renamed
without changing its info attribute.
https://fedorahosted.org/freeipa/ticket/1528
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_xmlrpc/test_automount_plugin.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_xmlrpc/test_automount_plugin.py b/tests/test_xmlrpc/test_automount_plugin.py index 0face2ef0..cfea61270 100644 --- a/tests/test_xmlrpc/test_automount_plugin.py +++ b/tests/test_xmlrpc/test_automount_plugin.py @@ -34,6 +34,7 @@ class test_automount(XMLRPC_test): locname = u'testlocation' mapname = u'testmap' keyname = u'testkey' + keyname_rename = u'testkey_rename' keyname2 = u'testkey2' description = u'description of map' info = u'ro' @@ -127,9 +128,11 @@ class test_automount(XMLRPC_test): Test the `xmlrpc.automountkey_mod` method. """ self.key_kw['newautomountinformation'] = self.newinfo + self.key_kw['rename'] = self.keyname_rename res = api.Command['automountkey_mod'](self.locname, self.mapname, **self.key_kw)['result'] assert res - assert_attr_equal(res, 'automountinformation', 'rw') + assert_attr_equal(res, 'automountinformation', self.newinfo) + assert_attr_equal(res, 'automountkey', self.keyname_rename) def test_a_automountmap_mod(self): """ @@ -144,7 +147,7 @@ class test_automount(XMLRPC_test): """ Test the `xmlrpc.automountkey_del` method. """ - delkey_kw={'automountkey': self.keyname, 'automountinformation' : self.newinfo, 'raw': True} + delkey_kw={'automountkey': self.keyname_rename, 'automountinformation' : self.newinfo, 'raw': True} res = api.Command['automountkey_del'](self.locname, self.mapname, **delkey_kw)['result'] assert res assert_attr_equal(res, 'failed', '') |