<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 08/11/2015 10:06 AM, thierry bordaz
wrote:<br>
</div>
<blockquote cite="mid:55C9AD03.3070107@redhat.com" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 08/04/2015 01:37 PM, Lenka Doudova
wrote:<br>
</div>
<blockquote cite="mid:55C0A40A.8080606@redhat.com" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<br>
<br>
<div class="moz-cite-prefix">Dne 30.7.2015 v 16:10 Martin Basti
napsal(a):<br>
</div>
<blockquote cite="mid:55BA3051.2070703@redhat.com" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 30/07/15 16:09, Martin Basti
wrote:<br>
</div>
<blockquote cite="mid:55BA2FFE.6010400@redhat.com" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 29/07/15 16:10, Martin Basti
wrote:<br>
</div>
<blockquote cite="mid:55B8DED8.90909@redhat.com" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 29/07/15 15:29, Lenka
Doudova wrote:<br>
</div>
<blockquote cite="mid:55B8D552.8040306@redhat.com"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
Hi,<br>
<br>
thanks a lot for the comments, will work on it tomorrow.<br>
<br>
Lenka<br>
<br>
<div class="moz-cite-prefix">Dne 29.7.2015 v 15:27
Martin Basti napsal(a):<br>
</div>
<blockquote cite="mid:55B8D4B4.8090303@redhat.com"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 27/07/15 16:47, Lenka
Doudova wrote:<br>
</div>
<blockquote cite="mid:55B64495.30309@redhat.com"
type="cite">Hi, <br>
<br>
I'm attaching a patch with automated tests for
stageuser plugin (<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://fedorahosted.org/freeipa/ticket/3813">https://fedorahosted.org/freeipa/ticket/3813</a>).
The user plugin test is affected as well (one class
was added). <br>
The tests seem a bit of a mess even to myself, but
what with the way freeipa behaves I didn't know how
else to implement them, but I'm eager to learn how
to do it in a nicer way, if someone has a better
idea. <br>
<br>
Lenka <br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
I just applied patches:<br>
<br>
1) Please remove whitespace errors<br>
$ git am
freeipa-lryznaro-0002-Automated-test-for-stageuser-plugin.patch<br>
Applying: Automated test for stageuser plugin<br>
/home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:110:
trailing whitespace.<br>
""" Tracker class for staged user LDAP object <br>
/home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:113:
trailing whitespace.<br>
StageUserTracker object stores information
about the user. <br>
/home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:121:
trailing whitespace.<br>
u'krbprincipalexpiration', u'usercertificate',
u'dn', u'has_keytab', u'has_password', <br>
/home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:122:
trailing whitespace.<br>
u'street', u'postalcode',
u'facsimiletelephonenumber', u'carlicense', <br>
/home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:125:
trailing whitespace.<br>
u'cn', u'ipauniqueid', u'objectclass',
u'description', <br>
warning: squelched 50 whitespace errors<br>
warning: 55 lines add whitespace errors.<br>
<br>
2)<br>
Please use new shorter format of license header<br>
<br>
3) can you fix some of the most serious PEP8 errors<br>
$ git show -U0 | pep8 --diff | wc -l<br>
198<br>
<br>
4)<br>
if options != None:<br>
<br>
Please use "options *is not* None"<br>
<br>
5) <br>
For consistency it should be u'random'<br>
if key == 'random':<br>
self.attrs[u'randompassword'] =
fuzzy_string<br>
<br>
Otherwise it looks good<br>
Martin^2<br>
<pre class="moz-signature" cols="72">--
Martin Basti</pre>
</blockquote>
<br>
</blockquote>
And also fix this please<br>
<br>
./make-lint <br>
************* Module
ipatests.test_xmlrpc.test_stageuser_plugin<br>
ipatests/test_xmlrpc/test_stageuser_plugin.py:337:
[E0102(function-redefined), user2] function already
defined line 44)<br>
<br>
<pre class="moz-signature" cols="72">--
Martin Basti</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
Ahoj, v patchi mas este uvedene svoje stare meno, mala by si
v gite nastavit redhat email<br>
<br>
<pre class="moz-signature" cols="72">--
Martin Basti</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
Sorry for spam, you can safely ignore this. :)<br>
<br>
<pre class="moz-signature" cols="72">--
Martin Basti</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
Attaching new patch - (hopefully) fixed the errors from the old
one + few test cases were added.<br>
<br>
Lenka<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
<br>
<font face="Times New Roman, Times, serif">Hello Lenka,<br>
<br>
This is a very impressive work and test framework. I have not
understood all the details of the implementation so I just focus
on the reading the tests body.<br>
The patch is looking great to me and I have really few minors
comments.<br>
<br>
</font>
<ul>
<li><font face="Times New Roman, Times, serif">About non
existing stage user, you may try to activate a non existing
one. Is it what TestStagedUser.test_activate does ?</font></li>
</ul>
</blockquote>
<font face="Times New Roman, Times, serif">No, it didn't occur to me
to test activation of nonexistent user, I can add it.</font><br>
<blockquote cite="mid:55C9AD03.3070107@redhat.com" type="cite">
<ul>
<li><font face="Times New Roman, Times, serif">In
test_create_attr, I can see that user6 is activated. How is
checked that the specified values are preserved ? (sorry my
python skill is still very low)</font></li>
</ul>
</blockquote>
<font face="Times New Roman, Times, serif">The values are checked -
in the test itself, using 'create_from_staged' I first copy
attributes of stage user object to a new active user object (just
object, not the ipa user itself) and in 'check_activate' I verify
that values of ipa user correspond with those taken from staged
user</font><br>
<blockquote cite="mid:55C9AD03.3070107@redhat.com" type="cite">
<ul>
<li><font face="Times New Roman, Times, serif">Many testcases (<a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www.freeipa.org/page/V4/User_Life-Cycle_Management/Test_Plan#Test_case:_Try_to_search_for_a_nonexistent_user"><a class="moz-txt-link-freetext" href="http://www.freeipa.org/page/V4/User_Life-Cycle_Management/Test_Plan#Test_case:_Try_to_search_for_a_nonexistent_user">http://www.freeipa.org/page/V4/User_Life-Cycle_Management/Test_Plan#Test_case:_Try_to_search_for_a_nonexistent_user</a></a>)
are about creating a stage user with various attributes
(initial,shell, homedir...). I found uid/gid, are the others
implemented ?</font></li>
</ul>
</blockquote>
<font face="Times New Roman, Times, serif">Yes, all the options are
implemented using parametrized fixture 'stageduser2' +
'options_ok' list, tests are performed by 'test_create_attr'
method. These tests also contain activation check (users can be
activated and values are preserved).</font><br>
<blockquote cite="mid:55C9AD03.3070107@redhat.com" type="cite">
<ul>
<li><font face="Times New Roman, Times, serif">In
TestActive.test_delete_preserve, does check_delete check the
active container or the stageuser container ?</font></li>
</ul>
</blockquote>
<font face="Times New Roman, Times, serif">check_delete just checks
the result of 'user-del' command (it just says that a certain user
has been deleted). But after that, there is a verification that
the user is no longer in <u>active</u> container performed by
running 'user-show' command with 'not found' as expected result.</font><br>
<blockquote cite="mid:55C9AD03.3070107@redhat.com" type="cite">
<ul>
<li><font face="Times New Roman, Times, serif">Does
test_delete_preserved checks that the deleted entry has been
permanently removed ?</font></li>
</ul>
</blockquote>
<font face="Times New Roman, Times, serif">If you mean whether there
is a check like running 'user-show' command and expecting 'not
found', no, there is not. I haven't thought about it. Can add.</font><br>
<br>
<blockquote cite="mid:55C9AD03.3070107@redhat.com" type="cite">
<ul>
<li><font face="Times New Roman, Times, serif">Is
test_preserved_membership the test case for <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://fedorahosted.org/freeipa/ticket/5170"><a class="moz-txt-link-freetext" href="https://fedorahosted.org/freeipa/ticket/5170">https://fedorahosted.org/freeipa/ticket/5170</a></a>
?</font></li>
</ul>
</blockquote>
<font face="Times New Roman, Times, serif">I'd say that partly - it
just verifies if membership can be added to a preserved user
(expects failure of such attempt). <br>
It does not check whether a user with thus successfully assigned
membership preserves it after 'user-undel' (but that is part of
TestPreserved.test_reactivate_preserved - the
'check_attr_preservation' method verifies that reactivated user is
member of 'ipausers' group only).<br>
<br>
Lenka<br>
</font>
<blockquote cite="mid:55C9AD03.3070107@redhat.com" type="cite">
<ul>
</ul>
<p><font face="Times New Roman, Times, serif">Thanks<br>
thierry</font><br>
</p>
</blockquote>
<br>
</body>
</html>