diff options
author | Martin Kosek <mkosek@redhat.com> | 2012-01-06 13:58:01 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-01-13 21:55:07 +0100 |
commit | d50618f6bd032b59a1893f7eb23e47616efab8fe (patch) | |
tree | 4ff235f13e1e7bc1e1ecbcbd4ed9f4fdd1209247 /tests | |
parent | 86f908a0e4b1f8c30c0096a9e9ad5186b7060816 (diff) | |
download | freeipa-d50618f6bd032b59a1893f7eb23e47616efab8fe.tar.gz freeipa-d50618f6bd032b59a1893f7eb23e47616efab8fe.tar.xz freeipa-d50618f6bd032b59a1893f7eb23e47616efab8fe.zip |
Restore ACI when aci_mod fails
aci_mod command is composed of 2 ACI commands: aci_del which
deletes the old ACI and aci_add which adds the new modified ACI.
However, if aci_add command fails then both new and the old ACI
are lost. Old ACI must be restored in this case.
https://fedorahosted.org/freeipa/ticket/2013
https://fedorahosted.org/freeipa/ticket/2014
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_xmlrpc/test_selfservice_plugin.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_selfservice_plugin.py b/tests/test_xmlrpc/test_selfservice_plugin.py index 6a304a985..cb4b387de 100644 --- a/tests/test_xmlrpc/test_selfservice_plugin.py +++ b/tests/test_xmlrpc/test_selfservice_plugin.py @@ -173,6 +173,31 @@ class test_selfservice(Declarative): dict( + desc='Try to update %r with empty permissions' % selfservice1, + command=( + 'selfservice_mod', [selfservice1], dict(permissions=None) + ), + expected=errors.RequirementError(name='permissions'), + ), + + + dict( + desc='Retrieve %r to verify invalid update' % selfservice1, + command=('selfservice_show', [selfservice1], {}), + expected=dict( + value=selfservice1, + summary=None, + result={ + 'attrs': [u'street', u'c', u'l', u'st', u'postalcode'], + 'permissions': [u'read'], + 'selfaci': True, + 'aciname': selfservice1, + }, + ), + ), + + + dict( desc='Delete %r' % selfservice1, command=('selfservice_del', [selfservice1], {}), expected=dict( |