freeipa/ipaplatform
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
..
base ipatests: Collect all logs on all Unix hosts 2020-04-28 17:50:10 +02:00
debian Debian: Use parse_ipa_version from redhat. 2020-04-28 14:39:42 +02:00
fedora Enable TLS 1.3 support on the server 2019-12-02 16:48:07 +01:00
redhat Debian: write out only one CA certificate per file 2020-04-08 14:17:31 +03:00
rhel Use nis-domainname.service on all RH platforms 2019-07-04 10:43:51 +02:00
suse Support for SUSE/openSUSE ipaplatform 2020-04-15 18:50:45 +02:00
__init__.py Refactor os-release and platform information 2018-08-30 11:37:21 +02:00
_importhook.py Py3: Remove subclassing from object 2018-09-27 11:49:04 +02:00
constants.py Add absolute_import future imports 2018-04-20 09:43:37 +02:00
Makefile.am Use namespace-aware meta importer for ipaplatform 2017-11-15 14:17:24 +01:00
osinfo.py ipatests: remove all occurrences of osinfo.version_id 2019-03-01 08:38:11 +01:00
override.py.in Use namespace-aware meta importer for ipaplatform 2017-11-15 14:17:24 +01:00
paths.py Add absolute_import future imports 2018-04-20 09:43:37 +02:00
services.py Add absolute_import future imports 2018-04-20 09:43:37 +02:00
setup.cfg Port all setup.py to setuptools 2016-10-20 18:43:37 +02:00
setup.py Support for SUSE/openSUSE ipaplatform 2020-04-15 18:50:45 +02:00
tasks.py Add absolute_import future imports 2018-04-20 09:43:37 +02:00