[Freeipa-devel] [PATCH 0024][Tests] Fix integration tests not to produce incorrect /etc/hosts file

Lenka Doudova ldoudova at redhat.com
Tue Jul 19 11:19:13 UTC 2016



On 06/29/2016 06:49 PM, Petr Spacek wrote:
> On 29.6.2016 18:39, Oleg Fayans wrote:
>> In fact, I believe /etc/hosts file should not be touched at all.
>> Hostname resolution is usually governed by the DNS system of the lab in
>> which tests are running. We do not modify it when perform tests
>> manually, so I'd rather remove this method at all.
> +1, it should not be need. Let me know if it is needed for some reason and I
> will have a look.
>
> Petr^2 Spacek
Hi,

providing new (and renamed) patch as was suggested in the discussion 
above - removing manipulation with /etc/hosts file from the tests.
The "fix_etc_hosts" function was completely removed from the tasks file. 
Verification that nothing is broken by this change was done by running 
some random integration test (trust tests), and also on Milan's 
suggestion by running a test requiring two replicas (replica promotion 
tests).

Lenka

>> On 06/29/2016 06:27 PM, Lenka Doudova wrote:
>>> Hi all,
>>>
>>> a function 'fix_etc_hosts' in ipatests/test_integration/tasks.py
>>> produces incorrect /etc/hosts file (solitary IPv6 address), and
>>> currently parser is not able to resolve the issue, causing
>>> ipa-server-install to fail with 'list index out of range' error.
>>>
>>> Hence I'm attaching patch to fix this issue before parser is fixed
>>> (related ticket to it #6014). The fix is just change of regexs
>>> responsible for creating incorrect file so that all the lines containing
>>> defined hostname are removed, not just specific IP/hostname/shortname
>>> strings.
>>>
>>>
>>> Lenka

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-ldoudova-0024.2-Tests-Removing-manipulation-with-etc-hosts-file-from.patch
Type: text/x-patch
Size: 1850 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160719/46c504f5/attachment.bin>


More information about the Freeipa-devel mailing list