freeipa/ipatests
Stanislav Levin 63747bc0c0 ipatests: Collect all logs on all Unix hosts
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>
2020-04-28 17:50:10 +02:00
..
azure doc/Makefile: use sphinx-build -W by default 2020-04-21 14:59:02 +02:00
man Simplify ipa-run-tests script 2019-07-16 13:23:21 +03:00
prci_definitions ipatests: increase test_webui_server timeout 2020-04-14 14:11:11 +02:00
pytest_ipa ipatests: Collect all logs on all Unix hosts 2020-04-28 17:50:10 +02:00
test_cmdline pytest: Migrate unittest/nose to Pytest fixtures 2020-02-12 18:08:32 +02:00
test_install pytest: Migrate unittest/nose to Pytest fixtures 2020-02-12 18:08:32 +02:00
test_integration Add skip_if_platform marker 2020-04-28 15:33:57 +02:00
test_ipaclient Fix Pytest4.x warning about message 2019-06-19 19:20:14 +10:00
test_ipalib Add skip_if_platform marker 2020-04-28 15:33:57 +02:00
test_ipaplatform Don't configure KEYRING ccache in containers 2019-01-18 11:33:11 +01:00
test_ipapython pylint: Synchronize pylint plugin to ipatests code 2020-02-12 18:08:32 +02:00
test_ipaserver Use api.env.container_sysaccounts 2020-04-28 11:28:29 +02:00
test_ipatests_plugins ipatests: Allow zero-length arguments 2020-02-14 09:29:20 +02:00
test_webui pytest: Migrate unittest/nose to Pytest fixtures 2020-02-12 18:08:32 +02:00
test_xmlrpc ipatests: Remove deprecated yield_fixture 2020-04-21 13:24:50 +02:00
__init__.py Make an ipa-tests package 2013-06-17 19:22:50 +02:00
conftest.py Add skip_if_platform marker 2020-04-28 15:33:57 +02:00
create_external_ca.py Test external CA with DNS name constraints 2019-08-06 12:39:46 +02:00
data.py Fix more bytes/unicode issues 2015-10-22 18:34:46 +02:00
i18n.py Sprinkle raw strings across the code base 2018-09-27 10:23:03 +02:00
ipa-run-tests ipatests: Specify shell implementation 2020-04-21 13:24:50 +02:00
ipa-test-config Rename pytest_plugins to ipatests.pytest_ipa 2018-08-02 17:07:43 +02:00
ipa-test-task Rename pytest_plugins to ipatests.pytest_ipa 2018-08-02 17:07:43 +02:00
Makefile.am Build: fix distribution of static files for web UI 2016-11-09 13:08:32 +01:00
setup.cfg Port all setup.py to setuptools 2016-10-20 18:43:37 +02:00
setup.py Simplify ipa-run-tests script 2019-07-16 13:23:21 +03:00
test_util.py ipatests: Remove deprecated yield_fixture 2020-04-21 13:24:50 +02:00
util.py ipatests: Remove no longer needed 'skip' compatibility 2020-04-21 13:24:50 +02:00