<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 08.07.2016 15:41, Oleg Fayans wrote:<br>
</div>
<blockquote cite="mid:577FAD77.7080504@redhat.com" type="cite">Hi
Martin,
<br>
<br>
Thanks for the review!
<br>
<br>
On 07/08/2016 02:18 PM, Martin Basti wrote:
<br>
<blockquote type="cite">
<br>
<br>
On 27.06.2016 13:53, Oleg Fayans wrote:
<br>
<blockquote type="cite">Hi guys,
<br>
<br>
Is there a chance the patches NN 0047.1 and 0048.1 get
reviewed before
<br>
4.4 release? They cover a good part of the Managed Topology
4.4 feature.
<br>
<br>
On 06/17/2016 11:18 AM, Oleg Fayans wrote:
<br>
<blockquote type="cite">One more test was added to the
patch-0048
<br>
<br>
On 06/17/2016 09:43 AM, Oleg Fayans wrote:
<br>
<blockquote type="cite">Fixed a bug in the previous patch,
automated 2 more testcases from
<br>
<a class="moz-txt-link-freetext" href="http://www.freeipa.org/page/V4/Manage_replication_topology_4_4/Test_Plan">http://www.freeipa.org/page/V4/Manage_replication_topology_4_4/Test_Plan</a>
<br>
<br>
<br>
On 06/16/2016 04:46 PM, Oleg Fayans wrote:
<br>
<blockquote type="cite">
<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
</blockquote>
IIUC, this will turn off the machine completely, how is cleanup
done
<br>
then. AFAIK our tests cannot turn on machine again and run
cleanup, so
<br>
you will not be able to run more tests on the same topology
without
<br>
manual cleanup and manual start.
<br>
<br>
+ replica = self.replicas[0]
<br>
+ replica.run_command(['poweroff'])
<br>
<br>
IMO would be better to just call 'ipactl stop' instead of
'poweroff'
<br>
</blockquote>
<br>
Agreed! Fixed.
<br>
<br>
<blockquote type="cite">
<br>
Martin^2
<br>
<br>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
*Automated ipa-replica-manage del tests*<br>
<br>
1)<br>
+ replica.run_command(['ipactl', 'stop'])<br>
+ time.sleep(3)<br>
<br>
Why do you need sleep here?<br>
<br>
<br>
2)<br>
+ ruvid_re = re.compile(".*%s:389: (\d+).*" %
replica.hostname)<br>
+ replica_ruvs = ruvid_re.findall(result.stdout_text)<br>
+ master.run_command(['ipa-replica-manage', 'clean-ruv', 'f',<br>
+ '-p', master.config.dirman_password,<br>
+ replica_ruvs[0]])<br>
<br>
Because you are using re.findall(), without any match you will
receive IndexError here replica_ruvs[0]. IMO it deserves assert
before.<br>
<br>
3)<br>
assert(replica.hostname in result1.stdout_text)<br>
<br>
I think that this is error prone. What if there is just error 'could
not connect to replica <replica hostname>', or something
similar. instead of listing/cleaning/whatever operation was
executed. I think that it should be more specific regexp than just
finding a replica name substring (Yes In IPA we dont always print
error so stderr)<br>
<br>
I'm not sure, but probably there might be cases when non critical
error happen and exist status is still 0<br>
<br>
4)<br>
<br>
+ replica.run_command(['poweroff'])<br>
+ time.sleep(3)<br>
<br>
There should not be poweroff, probably sleep could be removed too.<br>
<br>
<br>
* Automated clean-ruv subcommand test*<br>
<br>
1) PEP8, 2 new lines expected<br>
./ipatests/test_integration/test_topology.py:163:1: E302 expected 2
blank lines, found 0<br>
./ipatests/test_integration/test_topology.py:182:80: E501 line too
long (85 > 79 characters)<br>
<br>
<br>
2)<br>
I dont like doing assert just with count of occurences of substring
in STDOUT, would be possible to improve this somehow?<br>
<br>
3)<br>
I'm not sure if clean-ruv is instant operations or there is some
magic happening in background (we have abort-clean-ruv). Maybe some
sleep should be there, but this needs investigation.<br>
<br>
+ assert(replica.hostname in result2.stdout_text), (<br>
+ "The wrong RUV was deleted")<br>
+ result3 = master.run_command(['ipa-replica-manage',
'list-ruv',<br>
+ '-p',
master.config.dirman_password])<br>
+ assert(result3.stdout_text.count(replica.hostname) == 1), (<br>
+ "CA RUV of the replica is still displayed")<br>
<br>
</body>
</html>