[Freeipa-devel] [PATCH 0372] CI: installation tests

Oleg Fayans ofayans at redhat.com
Mon Dec 7 14:49:17 UTC 2015


Hi,

On 12/07/2015 02:37 PM, Martin Basti wrote:
> 
> 
> On 07.12.2015 14:32, Martin Basti wrote:
>>
>>
>> On 07.12.2015 13:24, Oleg Fayans wrote:
>>> Hi Martin,
>>>
>>> I would prefer both install_kra and install_ca methods to have
>>> raiseonerr parameter set to True by default. We need a way to test
>>> negatives and analyze results.
>>> Mine looks like this:
>>>
>>> def install_kra(host, domain_level=None,
>>>                  first_instance=False, raiseonerr=True):
>>>      if not domain_level:
>>>         domain_level = host.config.domain_level
>>>      command = ["ipa-kra-install", "-U", "-p",
>>> host.config.dirman_password]
>>>      if domain_level == DOMAIN_LEVEL_0 and not first_instance:
>>>          replica_file = get_replica_filename(host)
>>>          command.append(replica_file)
>>>      return host.run_command(command, raiseonerr=raiseonerr)
>>>
>>> The rest looks good to me, but I did not run the tests yet.
>> Sounds good, I will amend the patche later.
> 
> I changed my mind, should not be the domain_level value get from
> function domainlevel(host)?

We should have a way to test negatives, like providing replica file at
domain level=1 and not providing at domain level=0. So these functions
should either accept replica file as a parameter, or arbitrary domain level

> Martin^2
> 
>>
>>>
>>> On 12/06/2015 10:22 PM, Martin Basti wrote:
>>>> My favorite today \o/ --> 67 <-- \o/ test cases, no more manual testing
>>>> of installers \o/.
>>>>
>>>> Test suite contains: 6 combination how to install components on replica
>>>> X 4 combinations of server installation + 3 extra server tests
>>>>
>>>> To save time tests install 1 master and 3 replicas per test class
>>>> (except extra server tests):
>>>> Class name  specifies what is installed on master.
>>>>
>>>> Remember, option "-k" is your friend
>>>> $ ipa-run-tests -k '<name of class you want to test (it is regexp)>'
>>>> otherwise you will need a lot of time until tests finish.
>>>>
>>>> To list all tests:
>>>> $ ipa-run-tests test_integration/test_installation.py --collect-only
>>>>
>>>>
>>>> Patch attached, it needs to have attached all patches I sent today and
>>>> also attached workaround patch (Martin3 will provide proper fix)
>>>>
>>>> I haven't had time/mood/resources to test this patch with domain level
>>>> 0, so testing this patch with domain level 0 is appreciated.
>>>>
>>>>
>>>> Oleg, I added some methods to tasks.py which you may want to reuse.
>>>>
>>>> Martin^2
>>>>
>>
> 

-- 
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.




More information about the Freeipa-devel mailing list