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


Okay then, please fix this error in a new patch.

Patch for replacement of stageuser-add --from delete already landed in devel list (patch mbasti-0297)

If you want to have this test in ipa-4-2 branch, please send rebased version. Current patch applies only on master.


--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to