[Freeipa-devel] [PATCHES] 0227-0229 freeipa-tests package & Beaker integration plugin

Jan Cholasta jcholast at redhat.com
Mon Jun 17 12:39:50 UTC 2013


On 14.6.2013 16:01, Petr Viktorin wrote:
> On 06/14/2013 03:20 PM, Jan Cholasta wrote:
>> Hi,
>>
>> On 28.5.2013 17:55, Petr Viktorin wrote:
>>> Hello,
>>>
>>> Patch 0227 creates the freeipa-tests package.
>>> As a system package, it needs a more unique name than "tests", so I
>>> renamed it to "ipatests". I also changed imports and references to it.
>>> Sorry to everyone developing tests right now ­– there will be conflicts,
>>> but hopefully they'll be straightforward.
>>> Note that the test suite does not yet pass when run outside the Git
>>> tree. Work on that is ongoing but not a priority right now (it's more
>>> important to get some integration tests running). Help would be
>>> appreciated :)
>>
>> Typo in commit message: "Tename the 'tests' directory ..."
>
> Thanks for the catch!
>
>> The patch needs rebasing.
>
> Attaching rebased versions.
>
>>> Patch 0228 adds a wrapper based on make-test which runs the
>>> system-installed test suite. freeipa-tests installs it as
>>> /usr/bin/ipa-run-tests.
>>> As I said above the tests currently fail when run this way.
>>>
>>> Patch 0229 adds a Nose plugin for integration with BeakerLib[1]. When
>>> the plugin is loaded (ipa-run-tests does that) and enabled (using the
>>> --with-beakerlib option), it hooks into Nose and runs rlPhase*, rlPass,
>>> rlFail and rlLog* Bash functions at appropriate events.
>>>
>>
>> I still need to actually run the code, I will do that with your patches
>> 230-240 included.
>
> If I may suggest, please test this set by itself. The tests→ipatests
> rename blocks or conflicts with other patches so it would be good to get
> it in soon, without waiting on the integration testing review.
>
>

When I run "make test" I get the following error:

Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/nose/loader.py", line 413, in 
loadTestsFromName
     addr.filename, addr.module)
   File "/usr/lib/python2.7/site-packages/nose/importer.py", line 47, in 
importFromPath
     return self.importFromDir(dir_path, fqname)
   File "/usr/lib/python2.7/site-packages/nose/importer.py", line 94, in 
importFromDir
     mod = load_module(part_fqname, fh, filename, desc)
   File 
"/home/jcholast/freeipa/ipatests/test_xmlrpc/test_host_plugin.py", line 
59, in <module>
     fd = open('tests/test_xmlrpc/service.crt', 'r')
IOError: [Errno 2] No such file or directory: 
'tests/test_xmlrpc/service.crt'

I believe the certificate path should begin with "ipatests" instead of 
"tests".


When I run "ipa-run-tests", I get an additional similar error in 
test_service_plugin.py:

Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/nose/loader.py", line 413, in 
loadTestsFromName
     addr.filename, addr.module)
   File "/usr/lib/python2.7/site-packages/nose/importer.py", line 47, in 
importFromPath
     return self.importFromDir(dir_path, fqname)
   File "/usr/lib/python2.7/site-packages/nose/importer.py", line 94, in 
importFromDir
     mod = load_module(part_fqname, fh, filename, desc)
   File 
"/usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/test_service_plugin.py", 
line 42, in <module>
     fd = open('ipatests/test_xmlrpc/service.crt', 'r')
IOError: [Errno 2] No such file or directory: 
'ipatests/test_xmlrpc/service.crt'


Also with "ipa-run-tests", many of the cmdline tests are failing with:

Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/nose/case.py", line 381, in setUp
     try_run(self.inst, ('setup', 'setUp'))
   File "/usr/lib/python2.7/site-packages/nose/util.py", line 469, in 
try_run
     return func()
   File 
"/usr/lib/python2.7/site-packages/ipatests/test_cmdline/cmdline.py", 
line 58, in setUp
     'Command %r not available' % self.command
AssertionError: Command 'ipa-client/ipa-getkeytab' not available


Honza

-- 
Jan Cholasta




More information about the Freeipa-devel mailing list