#7483 ipa-run-tests fails in ipatests/test_integration/test_topology.py if no YAML config provided
Closed: duplicate 6 years ago Opened 6 years ago by rcritten.

Request for enhancement

As a developer or integrator I want to run the IPA tests as simply as possible without a lot of extra configuration.

Issue

If no YAML file is provided the tests blow up:

ipa-run-tests

============================= test session starts ==============================
platform linux -- Python 3.6.4, pytest-3.2.3, py-1.4.34, pluggy-0.4.0
rootdir: /home/rcrit/redhat/freeipa/dist/rpms, inifile:
plugins: sourceorder-0.5, multihost-1.1
collected 3653 items / 2 errors

==================================== ERRORS ====================================
______ ERROR collecting ____
/usr/lib/python3.6/site-packages/ipatests/test
integration/test_topology.py:51: in <module>
class TestTopologyOptions(IntegrationTest):
/usr/lib/python3.6/site-packages/ipatests/test_integration/test_topology.py:88: in TestTopologyOptions
@remove_segment(config.domains[0].master,
E IndexError: list index out of range
____ ERROR collecting _______
/usr/lib/python3.6/site-packages/ipatests/test_integration/test_topology.py:51: in <module>
class TestTopologyOptions(IntegrationTest):
/usr/lib/python3.6/site-packages/ipatests/test_integration/test_topology.py:88: in TestTopologyOptions
@remove_segment(config.domains[0].master,
E IndexError: list index out of range
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 2 error in 7.00 seconds ============================


It fails because @remove_segment expects at least one master and one replica be defined.

Given that there is only a single use of remove_segment I propose that rather than passing individual hostnames the config object be passed instead and a skip decorator added to skip the test if no domains are configured.

Metadata Update from @rcritten:
- Issue assigned to rcritten

6 years ago

Metadata Update from @rcritten:
- Issue tagged with: test-failure, tests

6 years ago

Metadata Update from @rcritten:
- Issue close_status updated to: duplicate
- Issue status updated to: Closed (was: Open)

6 years ago

Login to comment on this ticket.

Metadata