URL: https://github.com/freeipa/freeipa/pull/3783
Author: stanislavlevin
Title: #3783: Migrate xunit-style setups to fixtures
Action: opened
PR body:
"""
This converts `setup*`/`teardown*` functions/methods to the
powerfull pytest fixtures:
```
The purpose of test fixtures is to provide a fixed baseline upon
which tests can reliably and repeatedly execute. pytest fixtures
offer dramatic improvements over the classic xUnit style of
setup/teardown functions:
- fixtures have explicit names and are activated by declaring their
use from test functions, modules, classes or whole projects.
- fixtures are implemented in a modular manner, as each fixture name
triggers a fixture function which can itself use other fixtures.
- fixture management scales from simple unit to complex functional
testing, allowing to parametrize fixtures and tests according to
configuration and component options, or to re-use fixtures across
function, class, module or whole test session scopes.
```
One of the transition patterns is as follows:
```diff
class TestFooBar(XMLRPC_test):
- @classmethod
- def setup_class(cls):
- super(TestFooBar, cls).setup_class()
+ @pytest.fixture(autouse=True, scope="class")
+ def foo_bar_setup(self, request, xmlrpc_setup):
+ cls = request.cls
cls.beforemethod()
- @classmethod
- def teardown_class(cls):
- cls.aftermethod()
- super(TestFooBar, cls).teardown_class()
+ def fin():
+ cls.aftermethod()
+ request.addfinalizer(fin)
```
To achieve predictable results for initialization and destroy of
Pytest fixtures, ones have to employ the fixtures' interdependencies.
This is the first part of the work to remove the mixing of test idioms in the
IPA test suite.
Related: https://pagure.io/freeipa/issue/7989
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/3783/head:pr3783
git checkout pr3783
URL: https://github.com/freeipa/freeipa/pull/4232
Author: abbra
Title: #4232: [Backport][ipa-4-6] install/updates: move external members past schema compat update
Action: opened
PR body:
"""
There is an ordering discrepancy because the base compat tree
configuration is in install/updates/80-schema_compat.update so it is ran
after 50-externalmembers.update. And since at that point
cn=groups,cn=Schema ... does not exist yet, external members
configuration is not applied.
Move it around to make sure it is applied after Schema Compatibility
plugin configuration is created.
Fixes: https://pagure.io/freeipa/issue/8193
Signed-off-by: Alexander Bokovoy <abokovoy(a)redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo(a)redhat.com>
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/4232/head:pr4232
git checkout pr4232
URL: https://github.com/freeipa/freeipa/pull/4231
Author: abbra
Title: #4231: [backport 4.7] install/updates: move external members past schema compat update
Action: opened
PR body:
"""
There is an ordering discrepancy because the base compat tree
configuration is in install/updates/80-schema_compat.update so it is ran
after 50-externalmembers.update. And since at that point
cn=groups,cn=Schema ... does not exist yet, external members
configuration is not applied.
Move it around to make sure it is applied after Schema Compatibility
plugin configuration is created.
Fixes: https://pagure.io/freeipa/issue/8193
Signed-off-by: Alexander Bokovoy <abokovoy(a)redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo(a)redhat.com>
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/4231/head:pr4231
git checkout pr4231
URL: https://github.com/freeipa/freeipa/pull/4230
Author: flo-renaud
Title: #4230: [Backport][ipa-4-8] install/updates: move external members past schema compat update
Action: opened
PR body:
"""
This PR was opened automatically because PR #4229 was pushed to master and backport to ipa-4-8 is required.
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/4230/head:pr4230
git checkout pr4230
URL: https://github.com/freeipa/freeipa/pull/4229
Author: abbra
Title: #4229: install/updates: move external members past schema compat update
Action: opened
PR body:
"""
There is an ordering discrepancy because the base compat tree
configuration is in install/updates/80-schema_compat.update so it is ran
after 50-externalmembers.update. And since at that point
cn=groups,cn=Schema ... does not exist yet, external members
configuration is not applied.
Move it around to make sure it is applied after Schema Compatibility
plugin configuration is created.
Fixes: https://pagure.io/freeipa/issue/8193
Signed-off-by: Alexander Bokovoy <abokovoy(a)redhat.com>
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/4229/head:pr4229
git checkout pr4229
URL: https://github.com/freeipa/freeipa/pull/4225
Author: flo-renaud
Title: #4225: [Backport][ipa-4-6] ipatests: fix modify_sssd_conf()
Action: opened
PR body:
"""
This PR was opened automatically because PR #4217 was pushed to master and backport to ipa-4-6 is required.
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/4225/head:pr4225
git checkout pr4225
URL: https://github.com/freeipa/freeipa/pull/4226
Author: flo-renaud
Title: #4226: [Backport][ipa-4-7] ipatests: fix modify_sssd_conf()
Action: opened
PR body:
"""
This PR was opened automatically because PR #4217 was pushed to master and backport to ipa-4-7 is required.
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/4226/head:pr4226
git checkout pr4226
URL: https://github.com/freeipa/freeipa/pull/4227
Author: flo-renaud
Title: #4227: [Backport][ipa-4-8] ipatests: fix modify_sssd_conf()
Action: opened
PR body:
"""
This PR was opened automatically because PR #4217 was pushed to master and backport to ipa-4-8 is required.
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/4227/head:pr4227
git checkout pr4227