Fix ansible-test imports and paths after refactor.
Also include a changelog entry covering this commit and the previous.
This commit is contained in:
parent
bb3904d299
commit
df2ae06d46
52 changed files with 257 additions and 253 deletions
2
changelogs/fragments/ansible-test-refactor-commands.yml
Normal file
2
changelogs/fragments/ansible-test-refactor-commands.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- ansible-test - Reorganize code for individual commands.
|
|
@ -789,7 +789,7 @@ class PathMapper:
|
|||
if path == 'test/lib/ansible_test/_data/completion/docker.txt':
|
||||
return all_tests(self.args, force=True) # force all tests due to risk of breaking changes in new test environment
|
||||
|
||||
if path.startswith('test/lib/ansible_test/_internal/cloud/'):
|
||||
if path.startswith('test/lib/ansible_test/_internal/commands/integration/cloud/'):
|
||||
cloud_target = 'cloud/%s/' % name
|
||||
|
||||
if cloud_target in self.integration_targets_by_alias:
|
||||
|
@ -799,7 +799,7 @@ class PathMapper:
|
|||
|
||||
return all_tests(self.args) # test infrastructure, run all tests
|
||||
|
||||
if path.startswith('test/lib/ansible_test/_internal/sanity/'):
|
||||
if path.startswith('test/lib/ansible_test/_internal/commands/sanity/'):
|
||||
return {
|
||||
'sanity': 'all', # test infrastructure, run all sanity checks
|
||||
'integration': 'ansible-test', # run ansible-test self tests
|
||||
|
@ -811,7 +811,7 @@ class PathMapper:
|
|||
'integration': 'ansible-test', # run ansible-test self tests
|
||||
}
|
||||
|
||||
if path.startswith('test/lib/ansible_test/_internal/units/'):
|
||||
if path.startswith('test/lib/ansible_test/_internal/commands/units/'):
|
||||
return {
|
||||
'units': 'all', # test infrastructure, run all unit tests
|
||||
'integration': 'ansible-test', # run ansible-test self tests
|
||||
|
|
|
@ -51,19 +51,19 @@ from .config import (
|
|||
ShellConfig,
|
||||
)
|
||||
|
||||
from .env import (
|
||||
from .commands.env import (
|
||||
EnvConfig,
|
||||
command_env,
|
||||
configure_timeout,
|
||||
)
|
||||
|
||||
from .sanity import (
|
||||
from .commands.sanity import (
|
||||
command_sanity,
|
||||
sanity_init,
|
||||
sanity_get_tests,
|
||||
)
|
||||
|
||||
from .units import (
|
||||
from .commands.units import (
|
||||
command_units,
|
||||
)
|
||||
|
||||
|
@ -76,7 +76,7 @@ from .target import (
|
|||
walk_sanity_targets,
|
||||
)
|
||||
|
||||
from .cloud import (
|
||||
from .commands.integration.cloud import (
|
||||
initialize_cloud_plugins,
|
||||
)
|
||||
|
||||
|
@ -95,53 +95,53 @@ from .util_common import (
|
|||
CommonConfig,
|
||||
)
|
||||
|
||||
from .coverage.combine import (
|
||||
from .commands.coverage.combine import (
|
||||
command_coverage_combine,
|
||||
)
|
||||
|
||||
from .coverage.erase import (
|
||||
from .commands.coverage.erase import (
|
||||
command_coverage_erase,
|
||||
)
|
||||
|
||||
from .coverage.html import (
|
||||
from .commands.coverage.html import (
|
||||
command_coverage_html,
|
||||
)
|
||||
|
||||
from .coverage.report import (
|
||||
from .commands.coverage.report import (
|
||||
command_coverage_report,
|
||||
CoverageReportConfig,
|
||||
)
|
||||
|
||||
from .coverage.xml import (
|
||||
from .commands.coverage.xml import (
|
||||
command_coverage_xml,
|
||||
)
|
||||
|
||||
from .coverage.analyze.targets.generate import (
|
||||
from .commands.coverage.analyze.targets.generate import (
|
||||
command_coverage_analyze_targets_generate,
|
||||
CoverageAnalyzeTargetsGenerateConfig,
|
||||
)
|
||||
|
||||
from .coverage.analyze.targets.expand import (
|
||||
from .commands.coverage.analyze.targets.expand import (
|
||||
command_coverage_analyze_targets_expand,
|
||||
CoverageAnalyzeTargetsExpandConfig,
|
||||
)
|
||||
|
||||
from .coverage.analyze.targets.filter import (
|
||||
from .commands.coverage.analyze.targets.filter import (
|
||||
command_coverage_analyze_targets_filter,
|
||||
CoverageAnalyzeTargetsFilterConfig,
|
||||
)
|
||||
|
||||
from .coverage.analyze.targets.combine import (
|
||||
from .commands.coverage.analyze.targets.combine import (
|
||||
command_coverage_analyze_targets_combine,
|
||||
CoverageAnalyzeTargetsCombineConfig,
|
||||
)
|
||||
|
||||
from .coverage.analyze.targets.missing import (
|
||||
from .commands.coverage.analyze.targets.missing import (
|
||||
command_coverage_analyze_targets_missing,
|
||||
CoverageAnalyzeTargetsMissingConfig,
|
||||
)
|
||||
|
||||
from .coverage import (
|
||||
from .commands.coverage import (
|
||||
COVERAGE_GROUPS,
|
||||
CoverageConfig,
|
||||
)
|
||||
|
|
0
test/lib/ansible_test/_internal/commands/__init__.py
Normal file
0
test/lib/ansible_test/_internal/commands/__init__.py
Normal file
|
@ -6,43 +6,43 @@ import errno
|
|||
import os
|
||||
import re
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..encoding import (
|
||||
from ...encoding import (
|
||||
to_bytes,
|
||||
)
|
||||
|
||||
from ..io import (
|
||||
from ...io import (
|
||||
open_binary_file,
|
||||
read_json_file,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
ApplicationError,
|
||||
common_environment,
|
||||
display,
|
||||
ANSIBLE_TEST_DATA_ROOT,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
intercept_command,
|
||||
ResultType,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
EnvironmentConfig,
|
||||
)
|
||||
|
||||
from ..executor import (
|
||||
from ...executor import (
|
||||
Delegate,
|
||||
install_command_requirements,
|
||||
)
|
||||
|
||||
from .. target import (
|
||||
from ... target import (
|
||||
walk_module_targets,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ... import types as t
|
||||
from .... import types as t
|
||||
|
||||
from .. import (
|
||||
CoverageConfig,
|
||||
|
|
|
@ -4,14 +4,14 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from .... import types as t
|
||||
from ..... import types as t
|
||||
|
||||
from ....io import (
|
||||
from .....io import (
|
||||
read_json_file,
|
||||
write_json_file,
|
||||
)
|
||||
|
||||
from ....util import (
|
||||
from .....util import (
|
||||
ApplicationError,
|
||||
display,
|
||||
)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from .... import types as t
|
||||
from ..... import types as t
|
||||
|
||||
from . import (
|
||||
CoverageAnalyzeTargetsConfig,
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from .... import types as t
|
||||
from ..... import types as t
|
||||
|
||||
from ....io import (
|
||||
from .....io import (
|
||||
SortedSetEncoder,
|
||||
write_json_file,
|
||||
)
|
||||
|
|
|
@ -4,7 +4,7 @@ __metaclass__ = type
|
|||
|
||||
import re
|
||||
|
||||
from .... import types as t
|
||||
from ..... import types as t
|
||||
|
||||
from . import (
|
||||
CoverageAnalyzeTargetsConfig,
|
||||
|
|
|
@ -4,17 +4,17 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from .... import types as t
|
||||
from ..... import types as t
|
||||
|
||||
from ....encoding import (
|
||||
from .....encoding import (
|
||||
to_text,
|
||||
)
|
||||
|
||||
from ....data import (
|
||||
from .....data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
from ....util_common import (
|
||||
from .....util_common import (
|
||||
ResultType,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from .... import types as t
|
||||
from ..... import types as t
|
||||
|
||||
from ....encoding import (
|
||||
from .....encoding import (
|
||||
to_bytes,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,20 +4,20 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
walk_compile_targets,
|
||||
walk_powershell_targets,
|
||||
)
|
||||
|
||||
from ..io import (
|
||||
from ...io import (
|
||||
read_text_file,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
display,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
ResultType,
|
||||
write_json_file,
|
||||
write_json_test_results,
|
||||
|
|
|
@ -4,7 +4,7 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
ResultType,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,15 +4,15 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from ..io import (
|
||||
from ...io import (
|
||||
make_dirs,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
display,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
ResultType,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,15 +4,15 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from ..io import (
|
||||
from ...io import (
|
||||
read_json_file,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
display,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
|
|
|
@ -16,21 +16,21 @@ from xml.dom import (
|
|||
minidom,
|
||||
)
|
||||
|
||||
from ..io import (
|
||||
from ...io import (
|
||||
make_dirs,
|
||||
read_json_file,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
ResultType,
|
||||
write_text_test_results,
|
||||
)
|
||||
|
||||
from ..env import (
|
||||
from ...util import (
|
||||
get_ansible_version,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
|
|
|
@ -10,17 +10,17 @@ import signal
|
|||
import sys
|
||||
import time
|
||||
|
||||
from .config import (
|
||||
from ...config import (
|
||||
CommonConfig,
|
||||
TestConfig,
|
||||
)
|
||||
|
||||
from .io import (
|
||||
from ...io import (
|
||||
write_json_file,
|
||||
read_json_file,
|
||||
)
|
||||
|
||||
from .util import (
|
||||
from ...util import (
|
||||
display,
|
||||
SubprocessError,
|
||||
ApplicationError,
|
||||
|
@ -28,31 +28,31 @@ from .util import (
|
|||
get_available_python_versions,
|
||||
)
|
||||
|
||||
from .util_common import (
|
||||
from ...util_common import (
|
||||
data_context,
|
||||
write_json_test_results,
|
||||
ResultType,
|
||||
)
|
||||
|
||||
from .docker_util import (
|
||||
from ...docker_util import (
|
||||
get_docker_command,
|
||||
docker_info,
|
||||
docker_version
|
||||
)
|
||||
|
||||
from .thread import (
|
||||
from ...thread import (
|
||||
WrappedThread,
|
||||
)
|
||||
|
||||
from .constants import (
|
||||
from ...constants import (
|
||||
TIMEOUT_PATH,
|
||||
)
|
||||
|
||||
from .test import (
|
||||
from ...test import (
|
||||
TestTimeout,
|
||||
)
|
||||
|
||||
from .ci import (
|
||||
from ...ci import (
|
||||
get_ci_provider,
|
||||
)
|
||||
|
||||
|
|
|
@ -8,31 +8,31 @@ import os
|
|||
import shutil
|
||||
import tempfile
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..encoding import (
|
||||
from ...encoding import (
|
||||
to_bytes,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
analyze_integration_target_dependencies,
|
||||
walk_integration_targets,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
IntegrationConfig,
|
||||
NetworkIntegrationConfig,
|
||||
PosixIntegrationConfig,
|
||||
WindowsIntegrationConfig,
|
||||
)
|
||||
|
||||
from ..io import (
|
||||
from ...io import (
|
||||
make_dirs,
|
||||
write_text_file,
|
||||
read_text_file,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
ApplicationError,
|
||||
display,
|
||||
COVERAGE_CONFIG_NAME,
|
||||
|
@ -41,24 +41,24 @@ from ..util import (
|
|||
MODE_FILE,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
named_temporary_file,
|
||||
ResultType,
|
||||
)
|
||||
|
||||
from ..coverage_util import (
|
||||
from ...coverage_util import (
|
||||
generate_coverage_config,
|
||||
)
|
||||
|
||||
from ..cache import (
|
||||
from ...cache import (
|
||||
CommonCache,
|
||||
)
|
||||
|
||||
from ..cloud import (
|
||||
from .cloud import (
|
||||
CloudEnvironmentConfig,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
|
|
|
@ -10,17 +10,17 @@ import re
|
|||
import tempfile
|
||||
import time
|
||||
|
||||
from .. import types as t
|
||||
from .... import types as t
|
||||
|
||||
from ..encoding import (
|
||||
from ....encoding import (
|
||||
to_bytes,
|
||||
)
|
||||
|
||||
from ..io import (
|
||||
from ....io import (
|
||||
read_text_file,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
ABC,
|
||||
ANSIBLE_TEST_CONFIG_ROOT,
|
||||
ApplicationError,
|
||||
|
@ -29,29 +29,29 @@ from ..util import (
|
|||
load_plugins,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ....util_common import (
|
||||
ResultType,
|
||||
write_json_test_results,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ....target import (
|
||||
IntegrationTarget,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
TestConfig,
|
||||
)
|
||||
|
||||
from ..ci import (
|
||||
from ....ci import (
|
||||
get_ci_provider,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ....data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
from ..docker_util import (
|
||||
from ....docker_util import (
|
||||
get_docker_command,
|
||||
)
|
||||
|
||||
|
@ -61,7 +61,7 @@ ENVIRONMENTS = {}
|
|||
|
||||
def initialize_cloud_plugins(): # type: () -> None
|
||||
"""Import cloud plugins and load them into the plugin dictionaries."""
|
||||
import_plugins('cloud')
|
||||
import_plugins('commands/integration/cloud')
|
||||
|
||||
load_plugins(CloudProvider, PROVIDERS)
|
||||
load_plugins(CloudEnvironment, ENVIRONMENTS)
|
||||
|
|
|
@ -4,11 +4,11 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
from ..containers import (
|
||||
from ....containers import (
|
||||
run_support_container,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,23 +4,23 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from .. import types as t
|
||||
from .... import types as t
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
ApplicationError,
|
||||
ConfigParser,
|
||||
display,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ....target import (
|
||||
IntegrationTarget,
|
||||
)
|
||||
|
||||
from ..core_ci import (
|
||||
from ....core_ci import (
|
||||
AnsibleCoreCI,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,34 +4,34 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from .. import types as t
|
||||
from .... import types as t
|
||||
|
||||
from ..io import (
|
||||
from ....io import (
|
||||
read_text_file,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
ApplicationError,
|
||||
ConfigParser,
|
||||
display,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ....target import (
|
||||
IntegrationTarget,
|
||||
)
|
||||
|
||||
from ..http import (
|
||||
from ....http import (
|
||||
HttpClient,
|
||||
parse_qs,
|
||||
urlparse,
|
||||
urlunparse,
|
||||
)
|
||||
|
||||
from ..core_ci import (
|
||||
from ....core_ci import (
|
||||
AnsibleCoreCI,
|
||||
)
|
||||
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
ConfigParser,
|
||||
display,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
|
|
|
@ -5,27 +5,27 @@ __metaclass__ = type
|
|||
import json
|
||||
import os
|
||||
|
||||
from .. import types as t
|
||||
from .... import types as t
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
ApplicationError,
|
||||
ConfigParser,
|
||||
display,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
from ..http import (
|
||||
from ....http import (
|
||||
urlparse,
|
||||
)
|
||||
|
||||
from ..docker_util import (
|
||||
from ....docker_util import (
|
||||
docker_exec,
|
||||
)
|
||||
|
||||
from ..containers import (
|
||||
from ....containers import (
|
||||
run_support_container,
|
||||
wait_for_file,
|
||||
)
|
||||
|
|
|
@ -4,11 +4,11 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
from ..containers import (
|
||||
from ....containers import (
|
||||
run_support_container,
|
||||
)
|
||||
|
||||
|
|
|
@ -5,15 +5,15 @@ __metaclass__ = type
|
|||
import os
|
||||
import tempfile
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
from ..docker_util import (
|
||||
from ....docker_util import (
|
||||
docker_cp_to,
|
||||
)
|
||||
|
||||
from ..containers import (
|
||||
from ....containers import (
|
||||
run_support_container,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
display,
|
||||
ConfigParser,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from .. import types as t
|
||||
from .... import types as t
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
ConfigParser,
|
||||
display,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ....target import (
|
||||
IntegrationTarget,
|
||||
)
|
||||
|
||||
from ..core_ci import (
|
||||
from ....core_ci import (
|
||||
AnsibleCoreCI,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,16 +4,16 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
display,
|
||||
generate_password,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
from ..containers import (
|
||||
from ....containers import (
|
||||
run_support_container,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
from ..containers import (
|
||||
from ....containers import (
|
||||
run_support_container,
|
||||
)
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
ConfigParser,
|
||||
display,
|
||||
)
|
||||
|
|
|
@ -4,19 +4,19 @@ __metaclass__ = type
|
|||
|
||||
import re
|
||||
|
||||
from ..io import (
|
||||
from ....io import (
|
||||
read_text_file,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
display,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
from ..containers import (
|
||||
from ....containers import (
|
||||
run_support_container,
|
||||
wait_for_file,
|
||||
)
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
ConfigParser,
|
||||
display,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,17 +4,17 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
ApplicationError,
|
||||
ConfigParser,
|
||||
display,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
from ..containers import (
|
||||
from ....containers import (
|
||||
run_support_container,
|
||||
)
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ..util import (
|
||||
from ....util import (
|
||||
ConfigParser,
|
||||
display,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ....config import (
|
||||
IntegrationConfig,
|
||||
)
|
||||
|
||||
|
|
|
@ -8,13 +8,13 @@ import os
|
|||
import re
|
||||
import collections
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..io import (
|
||||
from ...io import (
|
||||
read_json_file,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
ApplicationError,
|
||||
SubprocessError,
|
||||
display,
|
||||
|
@ -36,34 +36,34 @@ from ..util import (
|
|||
REMOTE_ONLY_PYTHON_VERSIONS,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
run_command,
|
||||
intercept_command,
|
||||
handle_layout_messages,
|
||||
)
|
||||
|
||||
from ..ansible_util import (
|
||||
from ...ansible_util import (
|
||||
ansible_environment,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
walk_internal_targets,
|
||||
walk_sanity_targets,
|
||||
TestTarget,
|
||||
)
|
||||
|
||||
from ..executor import (
|
||||
from ...executor import (
|
||||
get_changes_filter,
|
||||
AllTargetsSkipped,
|
||||
Delegate,
|
||||
install_command_requirements,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
from ..test import (
|
||||
from ...test import (
|
||||
TestSuccess,
|
||||
TestFailure,
|
||||
TestSkipped,
|
||||
|
@ -71,11 +71,11 @@ from ..test import (
|
|||
calculate_best_confidence,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
from ..content_config import (
|
||||
from ...content_config import (
|
||||
get_content_config,
|
||||
)
|
||||
|
||||
|
@ -1047,7 +1047,7 @@ SANITY_TESTS = (
|
|||
|
||||
def sanity_init():
|
||||
"""Initialize full sanity test list (includes code-smell scripts determined at runtime)."""
|
||||
import_plugins('sanity')
|
||||
import_plugins('commands/sanity')
|
||||
sanity_plugins = {} # type: t.Dict[str, t.Type[SanityFunc]]
|
||||
load_plugins(SanityFunc, sanity_plugins)
|
||||
sanity_tests = tuple([plugin() for plugin in sanity_plugins.values() if data_context().content.is_ansible or not plugin.ansible_only])
|
||||
|
|
|
@ -6,41 +6,41 @@ import collections
|
|||
import os
|
||||
import re
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanitySingleVersion,
|
||||
SanityFailure,
|
||||
SanitySuccess,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
TestTarget,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
SubprocessError,
|
||||
display,
|
||||
is_subdir,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
intercept_command,
|
||||
)
|
||||
|
||||
from ..ansible_util import (
|
||||
from ...ansible_util import (
|
||||
ansible_environment,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
from ..coverage_util import (
|
||||
from ...coverage_util import (
|
||||
coverage_context,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,29 +4,29 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanityVersionNeutral,
|
||||
SanityMessage,
|
||||
SanityFailure,
|
||||
SanitySuccess,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
from ..payload import (
|
||||
from ...payload import (
|
||||
ANSIBLE_BIN_SYMLINK_MAP,
|
||||
__file__ as symlink_map_full_path,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
ANSIBLE_BIN_PATH,
|
||||
ANSIBLE_TEST_DATA_ROOT,
|
||||
)
|
||||
|
|
|
@ -4,9 +4,9 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanityMultipleVersion,
|
||||
SanityMessage,
|
||||
SanityFailure,
|
||||
|
@ -15,11 +15,11 @@ from ..sanity import (
|
|||
SANITY_ROOT,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
TestTarget,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
SubprocessError,
|
||||
display,
|
||||
find_python,
|
||||
|
@ -27,11 +27,11 @@ from ..util import (
|
|||
is_subdir,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
run_command,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanityFailure,
|
||||
SanityIgnoreParser,
|
||||
SanityVersionNeutral,
|
||||
|
@ -12,12 +12,12 @@ from ..sanity import (
|
|||
SanityMessage,
|
||||
)
|
||||
|
||||
from ..test import (
|
||||
from ...test import (
|
||||
calculate_confidence,
|
||||
calculate_best_confidence,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanityMultipleVersion,
|
||||
SanityMessage,
|
||||
SanityFailure,
|
||||
|
@ -15,11 +15,11 @@ from ..sanity import (
|
|||
SANITY_ROOT,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
TestTarget,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
ANSIBLE_TEST_DATA_ROOT,
|
||||
SubprocessError,
|
||||
remove_tree,
|
||||
|
@ -32,34 +32,34 @@ from ..util import (
|
|||
REMOTE_ONLY_PYTHON_VERSIONS,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
intercept_command,
|
||||
run_command,
|
||||
ResultType,
|
||||
)
|
||||
|
||||
from ..ansible_util import (
|
||||
from ...ansible_util import (
|
||||
ansible_environment,
|
||||
)
|
||||
|
||||
from ..executor import (
|
||||
from ...executor import (
|
||||
generate_pip_install,
|
||||
install_cryptography,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
from ..coverage_util import (
|
||||
from ...coverage_util import (
|
||||
coverage_context,
|
||||
)
|
||||
|
||||
from ..venv import (
|
||||
from ...venv import (
|
||||
create_virtual_environment,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import json
|
|||
import textwrap
|
||||
import os
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanityVersionNeutral,
|
||||
SanityMessage,
|
||||
SanityFailure,
|
||||
|
@ -17,11 +17,11 @@ from ..sanity import (
|
|||
SANITY_ROOT,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
filter_targets,
|
||||
walk_posix_integration_targets,
|
||||
walk_windows_integration_targets,
|
||||
|
@ -29,21 +29,21 @@ from ..target import (
|
|||
walk_module_targets,
|
||||
)
|
||||
|
||||
from ..cloud import (
|
||||
from ..integration.cloud import (
|
||||
get_cloud_platforms,
|
||||
)
|
||||
|
||||
from ..io import (
|
||||
from ...io import (
|
||||
read_text_file,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
display,
|
||||
find_python,
|
||||
raw_command,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
write_json_test_results,
|
||||
ResultType,
|
||||
)
|
||||
|
|
|
@ -4,9 +4,9 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanitySingleVersion,
|
||||
SanityMessage,
|
||||
SanityFailure,
|
||||
|
@ -14,11 +14,11 @@ from ..sanity import (
|
|||
SANITY_ROOT,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
TestTarget,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
SubprocessError,
|
||||
read_lines_without_comments,
|
||||
parse_to_list_of_dict,
|
||||
|
@ -26,11 +26,11 @@ from ..util import (
|
|||
is_subdir,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
run_command,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import json
|
|||
import os
|
||||
import re
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanityVersionNeutral,
|
||||
SanityMessage,
|
||||
SanityFailure,
|
||||
|
@ -17,25 +17,25 @@ from ..sanity import (
|
|||
SANITY_ROOT,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
TestTarget,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
SubprocessError,
|
||||
find_executable,
|
||||
ANSIBLE_TEST_DATA_ROOT,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
run_command,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ import json
|
|||
import os
|
||||
import datetime
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanitySingleVersion,
|
||||
SanityMessage,
|
||||
SanityFailure,
|
||||
|
@ -17,11 +17,11 @@ from ..sanity import (
|
|||
SANITY_ROOT,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
TestTarget,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
SubprocessError,
|
||||
display,
|
||||
ConfigParser,
|
||||
|
@ -29,22 +29,22 @@ from ..util import (
|
|||
find_python,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
run_command,
|
||||
)
|
||||
|
||||
from ..ansible_util import (
|
||||
from ...ansible_util import (
|
||||
ansible_environment,
|
||||
get_collection_detail,
|
||||
CollectionDetail,
|
||||
CollectionDetailError,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanityVersionNeutral,
|
||||
SanityMessage,
|
||||
SanityFailure,
|
||||
|
@ -12,11 +12,11 @@ from ..sanity import (
|
|||
sanity_get_tests,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ from xml.etree.ElementTree import (
|
|||
Element,
|
||||
)
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanityVersionNeutral,
|
||||
SanityMessage,
|
||||
SanityFailure,
|
||||
|
@ -20,21 +20,21 @@ from ..sanity import (
|
|||
SANITY_ROOT,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
TestTarget,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
SubprocessError,
|
||||
read_lines_without_comments,
|
||||
find_executable,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
run_command,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ __metaclass__ = type
|
|||
import json
|
||||
import os
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanitySingleVersion,
|
||||
SanityMessage,
|
||||
SanityFailure,
|
||||
|
@ -15,35 +15,35 @@ from ..sanity import (
|
|||
SANITY_ROOT,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
TestTarget,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
SubprocessError,
|
||||
display,
|
||||
find_python,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
run_command,
|
||||
)
|
||||
|
||||
from ..ansible_util import (
|
||||
from ...ansible_util import (
|
||||
ansible_environment,
|
||||
get_collection_detail,
|
||||
CollectionDetailError,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
from ..ci import (
|
||||
from ...ci import (
|
||||
get_ci_provider,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
|
|
|
@ -5,11 +5,13 @@ __metaclass__ = type
|
|||
import json
|
||||
import os
|
||||
|
||||
from .. import types as t
|
||||
from ... import types as t
|
||||
|
||||
from ..import ansible_util
|
||||
from ...ansible_util import (
|
||||
check_pyyaml,
|
||||
)
|
||||
|
||||
from ..sanity import (
|
||||
from . import (
|
||||
SanitySingleVersion,
|
||||
SanityMessage,
|
||||
SanityFailure,
|
||||
|
@ -18,26 +20,26 @@ from ..sanity import (
|
|||
SANITY_ROOT,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
TestTarget,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
SubprocessError,
|
||||
display,
|
||||
is_subdir,
|
||||
find_python,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
run_command,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
SanityConfig,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
|
@ -71,7 +73,7 @@ class YamllintTest(SanitySingleVersion):
|
|||
:type python_version: str
|
||||
:rtype: TestResult
|
||||
"""
|
||||
pyyaml_presence = ansible_util.check_pyyaml(args, python_version, quiet=True)
|
||||
pyyaml_presence = check_pyyaml(args, python_version, quiet=True)
|
||||
if not pyyaml_presence['cloader']:
|
||||
display.warning("Skipping sanity test '%s' due to missing libyaml support in PyYAML."
|
||||
% self.name)
|
||||
|
|
|
@ -5,12 +5,12 @@ __metaclass__ = type
|
|||
import os
|
||||
import sys
|
||||
|
||||
from ..io import (
|
||||
from ...io import (
|
||||
write_text_file,
|
||||
make_dirs,
|
||||
)
|
||||
|
||||
from ..util import (
|
||||
from ...util import (
|
||||
ANSIBLE_TEST_DATA_ROOT,
|
||||
display,
|
||||
get_available_python_versions,
|
||||
|
@ -23,44 +23,44 @@ from ..util import (
|
|||
ANSIBLE_LIB_ROOT,
|
||||
)
|
||||
|
||||
from ..util_common import (
|
||||
from ...util_common import (
|
||||
intercept_command,
|
||||
ResultType,
|
||||
handle_layout_messages,
|
||||
create_temp_dir,
|
||||
)
|
||||
|
||||
from ..ansible_util import (
|
||||
from ...ansible_util import (
|
||||
ansible_environment,
|
||||
check_pyyaml,
|
||||
get_ansible_python_path,
|
||||
)
|
||||
|
||||
from ..target import (
|
||||
from ...target import (
|
||||
walk_internal_targets,
|
||||
walk_units_targets,
|
||||
)
|
||||
|
||||
from ..config import (
|
||||
from ...config import (
|
||||
UnitsConfig,
|
||||
)
|
||||
|
||||
from ..coverage_util import (
|
||||
from ...coverage_util import (
|
||||
coverage_context,
|
||||
)
|
||||
|
||||
from ..data import (
|
||||
from ...data import (
|
||||
data_context,
|
||||
)
|
||||
|
||||
from ..executor import (
|
||||
from ...executor import (
|
||||
AllTargetsSkipped,
|
||||
Delegate,
|
||||
get_changes_filter,
|
||||
install_command_requirements,
|
||||
)
|
||||
|
||||
from ..content_config import (
|
||||
from ...content_config import (
|
||||
get_content_config,
|
||||
)
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ from .manage_ci import (
|
|||
get_network_settings,
|
||||
)
|
||||
|
||||
from .cloud import (
|
||||
from .commands.integration.cloud import (
|
||||
cloud_filter,
|
||||
cloud_init,
|
||||
get_cloud_environment,
|
||||
|
@ -133,7 +133,7 @@ from .metadata import (
|
|||
ChangeDescription,
|
||||
)
|
||||
|
||||
from .integration import (
|
||||
from .commands.integration import (
|
||||
integration_test_environment,
|
||||
integration_test_config_file,
|
||||
setup_common_temp_dir,
|
||||
|
|
Loading…
Reference in a new issue