mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-25 08:21:05 -06:00
63747bc0c0
Each integration test entity sets up its own list of logfiles. This is made by calling the callback of host's 'collect_log', which knows nothing about the context of execution: whether it's the test class scope or the test method one. Of course, in this case one-time collection of test method log is not supported because the logs tracker collects only test class logs. In the meantime, almost all the entities (except 'client') collect identical logs. Besides, due to the IPA roles transformation an each IPA host can become master, replica or client, all of these, in turn, can have subroles. So, the most common case is the collection of all the possible logs from all the IPA (Unix) hosts. However, the customization of a logfiles collection is possible. The collection is performed with the help of 'integration_logs' fixture. For example, to add a logfile to list of logs on a test completion one should add the dependency on this fixture and call its 'collect_method_log' method. ``` class TestFoo(IntegrationTest): def test_foo(self): pass def test_bar(self, integration_logs): integration_logs.collect_method_log(self.master, '/logfile') ``` Collected logs: 1) 'test_foo' - default logs 2) 'test_bar' - default logs + /logfile 3) 'TestFoo' - default logs Fixes: https://pagure.io/freeipa/issue/8265 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Rob Crittenden <rcritten@redhat.com> |
||
---|---|---|
.. | ||
azure | ||
man | ||
prci_definitions | ||
pytest_ipa | ||
test_cmdline | ||
test_install | ||
test_integration | ||
test_ipaclient | ||
test_ipalib | ||
test_ipaplatform | ||
test_ipapython | ||
test_ipaserver | ||
test_ipatests_plugins | ||
test_webui | ||
test_xmlrpc | ||
__init__.py | ||
conftest.py | ||
create_external_ca.py | ||
data.py | ||
i18n.py | ||
ipa-run-tests | ||
ipa-test-config | ||
ipa-test-task | ||
Makefile.am | ||
setup.cfg | ||
setup.py | ||
test_util.py | ||
util.py |