[Freeipa-devel] [PATCH 0002] TEST: Stageuser plugin
Lenka Doudova
ldoudova at redhat.com
Mon Aug 24 12:14:20 UTC 2015
... and adding a patch version applicable for master branch
Lenka
On 08/24/2015 12:14 PM, Lenka Doudova wrote:
>
>
> On 08/20/2015 03:48 PM, Martin Basti wrote:
>>
>>
>> On 08/14/2015 06:32 PM, Lenka Doudova wrote:
>>> Yes, that is "correct" - it's malfunctioning behavior of the plugin
>>> - command 'stageuser-add --from-delete', which is discussed in
>>> another thread. I left this test case for so long as it's not
>>> fixed/changed. If the command remains and is fixed, the test case
>>> will be valid, if it's changed I'll fix the test case to reflect the
>>> new command.
>>>
>>> Lenka
>>>
>>> On 08/14/2015 05:39 PM, Martin Basti wrote:
>>>>
>>>>
>>>> On 08/14/2015 11:04 AM, Lenka Doudova wrote:
>>>>>> NACK
>>>>>>
>>>>>> syntax error, missing ')'
>>>>>> -from ipatests.util import assert_equal, assert_not_equal, raises
>>>>>> +from ipatests.util import (
>>>>>> + assert_equal, assert_not_equal, raises, assert_deepequal
>>>>>>
>>>>>> I cannot apply this patch, please check it
>>>>>
>>>>> Sorry for the error, corrected patch attached.
>>>>> I also added two testcases that Thierry proposed, and changed
>>>>> names of few methods (original ones were confusing).
>>>>>
>>>>> Lenka
>>>> I got this error
>>>>
>>>> ====================================================================================================
>>>> FAILURES
>>>> =====================================================================================================
>>>> ____________________________________________________________________________________
>>>> TestPreserved.test_staged_from_preserved
>>>> _____________________________________________________________________________________
>>>>
>>>> self = <ipatests.test_xmlrpc.test_stageuser_plugin.TestPreserved
>>>> object at 0x7ffb94811350>, user =
>>>> <ipatests.test_xmlrpc.test_user_plugin.UserTracker object at
>>>> 0x7ffb949e7190>
>>>> stageduser =
>>>> <ipatests.test_xmlrpc.test_stageuser_plugin.StageUserTracker object
>>>> at 0x7ffb94811c50>
>>>>
>>>> def test_staged_from_preserved(self, user, stageduser):
>>>> user.make_preserved_user()
>>>>
>>>> stageduser.ensure_missing()
>>>> stageduser = StageUserTracker(user.uid, user.givenname,
>>>> user.sn)
>>>> stageduser.create_from_preserved(user)
>>>> > command = user.make_create_command(from_delete=True)
>>>> E TypeError: make_create_command() got an unexpected keyword
>>>> argument 'from_delete'
>>>>
>>>> test_xmlrpc/test_stageuser_plugin.py:718: TypeError
>>>> ----------------------------------------------------------------------------------------------
>>>> Captured stdout setup
>>>> ----------------------------------------------------------------------------------------------
>>>> Ran command: ipalib.plugins.stageuser.stageuser_del()(u'suser1',
>>>> version=u'2.148'): NotFound: suser1: stage user not found
>>>> ----------------------------------------------------------------------------------------------
>>>> Captured stdout call
>>>> -----------------------------------------------------------------------------------------------
>>>> Ran command: ipalib.plugins.user.user_add()(u'auser1',
>>>> givenname=u'active', sn=u'user', version=u'2.148'): OK
>>>> Ran command: ipalib.plugins.user.user_del()(u'auser1',
>>>> preserve=True, no_preserve=False, version=u'2.148'): OK
>>>>
>>>> Martin^2
>>>
>> ACK
>>
>> I cannot apply your patch on top of ipa-4-2 branch, can you send
>> rebased version for ipa-4-2 branch?
>
> Attached. Applying works for me on ipa-4-2 branch, so I hope I finally
> got it right...
> Also this patch combines my previous patches 0002.3 + 0003.
> Lenka
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150824/0e7f5e8a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-master-lryznaro-0002.4-Automated-test-for-stageuser-plugin.patch
Type: text/x-patch
Size: 56023 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150824/0e7f5e8a/attachment.bin>
More information about the Freeipa-devel
mailing list