mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-24 15:16:40 -06:00
Rename pytest_plugins to ipatests.pytest_ipa
pytest 3.7.0 doesn't like ipatests.pytest_plugins package. The string "pytest_plugins" is used as marker to load plugins. By populare vote and to avoid future conflicts, we decided to rename the directory to pytest_ipa. Fixes: https://pagure.io/freeipa/issue/7663 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
71ba408d61
commit
6414509343
@ -25,14 +25,14 @@ except ImportError:
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
pytest_plugins = [
|
||||
'ipatests.pytest_plugins.additional_config',
|
||||
'ipatests.pytest_plugins.beakerlib',
|
||||
'ipatests.pytest_plugins.declarative',
|
||||
'ipatests.pytest_plugins.nose_compat',
|
||||
'ipatests.pytest_ipa.additional_config',
|
||||
'ipatests.pytest_ipa.beakerlib',
|
||||
'ipatests.pytest_ipa.declarative',
|
||||
'ipatests.pytest_ipa.nose_compat',
|
||||
]
|
||||
# The integration plugin is not available in client-only builds.
|
||||
if ipaserver is not None:
|
||||
pytest_plugins.append('ipatests.pytest_plugins.integration')
|
||||
pytest_plugins.append('ipatests.pytest_ipa.integration')
|
||||
|
||||
|
||||
MARKERS = [
|
||||
@ -56,7 +56,7 @@ NO_RECURSE_DIRS = [
|
||||
# install/share/wsgi.py
|
||||
'install/share',
|
||||
# integration plugin imports from ipaplatform
|
||||
'ipatests/pytest_plugins',
|
||||
'ipatests/pytest_ipa',
|
||||
]
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@ import argparse
|
||||
import json
|
||||
|
||||
from ipalib.constants import FQDN
|
||||
from ipatests.pytest_plugins.integration import config, env_config
|
||||
from ipatests.pytest_ipa.integration import config, env_config
|
||||
|
||||
|
||||
def main(argv):
|
||||
|
@ -27,10 +27,10 @@ import os
|
||||
import argparse
|
||||
|
||||
from ipapython.ipa_log_manager import standard_logging_setup
|
||||
from ipatests.pytest_plugins.integration import config
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_plugins.integration.host import Host
|
||||
from ipatests.pytest_plugins.integration import collect_logs
|
||||
from ipatests.pytest_ipa.integration import config
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipatests.pytest_ipa.integration.host import Host
|
||||
from ipatests.pytest_ipa.integration import collect_logs
|
||||
|
||||
try:
|
||||
from pytest_beakerlib import BeakerLibProcess
|
||||
|
@ -93,11 +93,11 @@ class Config(pytest_multihost.config.Config):
|
||||
|
||||
@classmethod
|
||||
def from_env(cls, env):
|
||||
from ipatests.pytest_plugins.integration.env_config import config_from_env
|
||||
from ipatests.pytest_ipa.integration.env_config import config_from_env
|
||||
return config_from_env(env)
|
||||
|
||||
def to_env(self, **kwargs):
|
||||
from ipatests.pytest_plugins.integration.env_config import config_to_env
|
||||
from ipatests.pytest_ipa.integration.env_config import config_to_env
|
||||
return config_to_env(self, **kwargs)
|
||||
|
||||
def filter(self, descriptions):
|
||||
@ -137,7 +137,7 @@ class Domain(pytest_multihost.config.Domain):
|
||||
raise LookupError(self.type)
|
||||
|
||||
def get_host_class(self, host_dict):
|
||||
from ipatests.pytest_plugins.integration.host import Host, WinHost
|
||||
from ipatests.pytest_ipa.integration.host import Host, WinHost
|
||||
|
||||
if self.type == 'IPA':
|
||||
return Host
|
||||
@ -172,9 +172,9 @@ class Domain(pytest_multihost.config.Domain):
|
||||
|
||||
@classmethod
|
||||
def from_env(cls, env, config, index, domain_type):
|
||||
from ipatests.pytest_plugins.integration.env_config import domain_from_env
|
||||
from ipatests.pytest_ipa.integration.env_config import domain_from_env
|
||||
return domain_from_env(env, config, index, domain_type)
|
||||
|
||||
def to_env(self, **kwargs):
|
||||
from ipatests.pytest_plugins.integration.env_config import domain_to_env
|
||||
from ipatests.pytest_ipa.integration.env_config import domain_to_env
|
||||
return domain_to_env(self, **kwargs)
|
@ -31,7 +31,7 @@ import collections
|
||||
import six
|
||||
|
||||
from ipapython import ipautil
|
||||
from ipatests.pytest_plugins.integration.config import Config, Domain
|
||||
from ipatests.pytest_ipa.integration.config import Config, Domain
|
||||
from ipalib.constants import MAX_DOMAIN_LEVEL
|
||||
|
||||
TESTHOST_PREFIX = 'TESTHOST_'
|
@ -53,11 +53,11 @@ class Host(pytest_multihost.host.Host):
|
||||
|
||||
@classmethod
|
||||
def from_env(cls, env, domain, hostname, role, index, domain_index):
|
||||
from ipatests.pytest_plugins.integration.env_config import host_from_env
|
||||
from ipatests.pytest_ipa.integration.env_config import host_from_env
|
||||
return host_from_env(env, domain, hostname, role, index, domain_index)
|
||||
|
||||
def to_env(self, **kwargs):
|
||||
from ipatests.pytest_plugins.integration.env_config import host_to_env
|
||||
from ipatests.pytest_ipa.integration.env_config import host_to_env
|
||||
return host_to_env(self, **kwargs)
|
||||
|
||||
|
@ -33,8 +33,8 @@ if __name__ == '__main__':
|
||||
package_dir={'ipatests': ''},
|
||||
packages=[
|
||||
"ipatests",
|
||||
"ipatests.pytest_plugins",
|
||||
"ipatests.pytest_plugins.integration",
|
||||
"ipatests.pytest_ipa",
|
||||
"ipatests.pytest_ipa.integration",
|
||||
"ipatests.test_cmdline",
|
||||
"ipatests.test_install",
|
||||
"ipatests.test_integration",
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
import pytest
|
||||
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from pytest_sourceorder import ordered
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
# pylint: disable=no-member
|
||||
|
||||
import re
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@ import pytest
|
||||
|
||||
import ipaplatform.paths
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
|
||||
default_profile = 'sssd'
|
||||
preconfigured_profile = 'winbind'
|
||||
|
@ -29,7 +29,7 @@ from ipaplatform.paths import paths
|
||||
from ipapython.dn import DN
|
||||
from ipapython import ipautil
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipatests.test_integration.test_dnssec import wait_until_record_is_signed
|
||||
from ipatests.test_integration.test_simple_replication import check_replication
|
||||
from ipatests.util import assert_deepequal
|
||||
|
@ -36,9 +36,9 @@ from ipapython import ipautil
|
||||
from ipaplatform.paths import paths
|
||||
from ipapython.dn import DN
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipatests.create_external_ca import ExternalCA
|
||||
from ipatests.pytest_plugins.integration import create_caless_pki
|
||||
from ipatests.pytest_ipa.integration import create_caless_pki
|
||||
from ipalib.constants import DOMAIN_LEVEL_0
|
||||
|
||||
if six.PY3:
|
||||
|
@ -13,7 +13,7 @@ import textwrap
|
||||
from ipaplatform.paths import paths
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
|
||||
|
||||
class TestIPACommand(IntegrationTest):
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
|
||||
DIRSRV_CONFIG_MODS = """
|
||||
# https://fedorahosted.org/freeipa/ticket/4949
|
||||
|
@ -11,7 +11,7 @@ import dns.rdatatype
|
||||
import dns.rdataclass
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipapython.dnsutil import DNSName
|
||||
from ipalib.constants import IPA_CA_RECORD
|
||||
|
||||
|
@ -12,7 +12,7 @@ import dns.resolver
|
||||
import dns.name
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipaplatform.paths import paths
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -22,7 +22,7 @@ import re
|
||||
import time
|
||||
import tempfile
|
||||
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipaplatform.paths import paths
|
||||
|
||||
|
@ -26,7 +26,7 @@ from ipaplatform.paths import paths
|
||||
import pytest
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import six
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipaplatform.paths import paths
|
||||
|
||||
|
@ -7,9 +7,9 @@ from __future__ import absolute_import
|
||||
import os
|
||||
import re
|
||||
import string
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration.env_config import get_global_config
|
||||
from ipatests.pytest_ipa.integration.env_config import get_global_config
|
||||
from ipaplatform.paths import paths
|
||||
config = get_global_config()
|
||||
|
||||
|
@ -13,9 +13,9 @@ import os
|
||||
import pytest
|
||||
from ipalib.constants import DOMAIN_LEVEL_0
|
||||
from ipaplatform.paths import paths
|
||||
from ipatests.pytest_plugins.integration.env_config import get_global_config
|
||||
from ipatests.pytest_ipa.integration.env_config import get_global_config
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipatests.test_integration.test_caless import CALessBase, ipa_certs_cleanup
|
||||
|
||||
config = get_global_config()
|
||||
|
@ -18,7 +18,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
|
||||
|
||||
class TestKerberosFlags(IntegrationTest):
|
||||
|
@ -28,7 +28,7 @@ import unittest
|
||||
|
||||
from ipaplatform.paths import paths
|
||||
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
|
||||
# importing test_trust under different name to avoid nose executing the test
|
||||
# base class imported from this module
|
||||
|
@ -5,7 +5,7 @@
|
||||
import pytest
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration.tasks import clear_sssd_cache
|
||||
from ipatests.pytest_ipa.integration.tasks import clear_sssd_cache
|
||||
|
||||
|
||||
test_data = []
|
||||
|
@ -10,10 +10,10 @@ from tempfile import NamedTemporaryFile
|
||||
import textwrap
|
||||
import pytest
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_plugins.integration.tasks import (
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipatests.pytest_ipa.integration.tasks import (
|
||||
assert_error, replicas_cleanup)
|
||||
from ipatests.pytest_plugins.integration.env_config import get_global_config
|
||||
from ipatests.pytest_ipa.integration.env_config import get_global_config
|
||||
from ipalib.constants import (
|
||||
DOMAIN_LEVEL_0, DOMAIN_LEVEL_1, DOMAIN_SUFFIX_NAME, IPA_CA_NICKNAME)
|
||||
from ipaplatform.paths import paths
|
||||
|
@ -5,9 +5,9 @@
|
||||
import time
|
||||
import pytest
|
||||
from ipalib.constants import DOMAIN_LEVEL_0
|
||||
from ipatests.pytest_plugins.integration.env_config import get_global_config
|
||||
from ipatests.pytest_ipa.integration.env_config import get_global_config
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
|
||||
config = get_global_config()
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
from itertools import permutations
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipalib.constants import DOMAIN_LEVEL_1, DOMAIN_SUFFIX_NAME, CA_SUFFIX_NAME
|
||||
|
||||
REMOVAL_ERR_TEMPLATE = ("Removal of '{hostname}' leads to disconnected "
|
||||
|
@ -20,7 +20,7 @@
|
||||
import os
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
|
||||
|
||||
class TestServicePermissions(IntegrationTest):
|
||||
|
@ -22,7 +22,7 @@ from __future__ import print_function
|
||||
import pytest
|
||||
|
||||
from ipapython.dn import DN
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
import pytest
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration.tasks import (
|
||||
from ipatests.pytest_ipa.integration.tasks import (
|
||||
clear_sssd_cache, get_host_ip_with_hostmask, modify_sssd_conf)
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
import json
|
||||
import copy
|
||||
|
||||
from ipatests.pytest_plugins.integration import config
|
||||
from ipatests.pytest_ipa.integration import config
|
||||
from ipapython.ipautil import write_tmp_file
|
||||
from ipatests.util import assert_deepequal
|
||||
from ipalib.constants import MAX_DOMAIN_LEVEL
|
||||
|
@ -17,7 +17,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
|
||||
|
||||
def test_topology_star():
|
||||
|
@ -7,8 +7,8 @@ import re
|
||||
import pytest
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_plugins.integration.env_config import get_global_config
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipatests.pytest_ipa.integration.env_config import get_global_config
|
||||
from ipalib.constants import DOMAIN_SUFFIX_NAME
|
||||
from ipatests.util import assert_deepequal
|
||||
|
||||
|
@ -23,7 +23,7 @@ import re
|
||||
import unittest
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipaplatform.paths import paths
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ pieces if possible.
|
||||
from __future__ import absolute_import
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
from ipaplatform.paths import paths
|
||||
from ipaserver.install.installutils import realm_to_serverid
|
||||
from ipaserver.install import dsinstance
|
||||
|
@ -7,7 +7,7 @@ Module provides tests to verify that the upgrade script works.
|
||||
"""
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
|
||||
|
||||
class TestUpgrade(IntegrationTest):
|
||||
|
@ -7,7 +7,7 @@ from __future__ import absolute_import
|
||||
|
||||
from ipaplatform.paths import paths
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
|
||||
|
||||
class TestUserPermissions(IntegrationTest):
|
||||
|
@ -5,7 +5,7 @@
|
||||
import time
|
||||
|
||||
from ipatests.test_integration.base import IntegrationTest
|
||||
from ipatests.pytest_plugins.integration import tasks
|
||||
from ipatests.pytest_ipa.integration import tasks
|
||||
|
||||
WAIT_AFTER_ARCHIVE = 45 # give some time to replication
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user