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:24 -0400 |
commit | 6aa0b57440ee83ef771c23c5bf81a5edc26e2e67 (patch) | |
tree | 91bee492fc7783620584c8bf898b68fafce31a4f /tests | |
parent | 704732630cbb466c00b0d49a88a016ed7f861c63 (diff) | |
download | freeipa-6aa0b57440ee83ef771c23c5bf81a5edc26e2e67.tar.gz freeipa-6aa0b57440ee83ef771c23c5bf81a5edc26e2e67.tar.xz freeipa-6aa0b57440ee83ef771c23c5bf81a5edc26e2e67.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', '') |