From 6944ffa010d0920fd5cedbf82007ad4ba25a1da6 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Tue, 15 Aug 2017 11:47:29 -0400 Subject: [PATCH] change imports to reflect isolated->expect move --- awx/main/expect/isolated_manager.py | 2 +- awx/main/tasks.py | 2 +- awx/main/tests/unit/expect/test_expect.py | 6 +++--- awx/main/tests/unit/test_tasks.py | 2 +- setup.py | 2 +- tools/docker-isolated-override.yml | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/awx/main/expect/isolated_manager.py b/awx/main/expect/isolated_manager.py index 94c003eace..48fd0e7b5c 100644 --- a/awx/main/expect/isolated_manager.py +++ b/awx/main/expect/isolated_manager.py @@ -13,7 +13,7 @@ import logging from django.conf import settings import awx -from awx.main.isolated import run +from awx.main.expect import run from awx.main.utils import OutputEventFilter from awx.main.queue import CallbackQueueDispatcher diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 3c07f21131..2c884802c2 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -51,7 +51,7 @@ from awx.main.constants import CLOUD_PROVIDERS, PRIVILEGE_ESCALATION_METHODS from awx.main.models import * # noqa from awx.main.models.unified_jobs import ACTIVE_STATES from awx.main.queue import CallbackQueueDispatcher -from awx.main.isolated import run, isolated_manager +from awx.main.expect import run, isolated_manager from awx.main.utils import (get_ansible_version, get_ssh_version, decrypt_field, update_scm_url, check_proot_installed, build_proot_temp_dir, get_licenser, wrap_args_with_proot, get_system_task_capacity, OutputEventFilter, diff --git a/awx/main/tests/unit/expect/test_expect.py b/awx/main/tests/unit/expect/test_expect.py index 4ccb4b9cbb..3978cb14c5 100644 --- a/awx/main/tests/unit/expect/test_expect.py +++ b/awx/main/tests/unit/expect/test_expect.py @@ -13,7 +13,7 @@ from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization -from awx.main.isolated import run, isolated_manager +from awx.main.expect import run, isolated_manager from django.conf import settings @@ -273,7 +273,7 @@ def test_check_isolated_job(private_data_dir, rsa_key): mgr.host = 'isolated-host' os.mkdir(os.path.join(private_data_dir, 'artifacts')) - with mock.patch('awx.main.isolated.run.run_pexpect') as run_pexpect: + with mock.patch('awx.main.expect.run.run_pexpect') as run_pexpect: def _synchronize_job_artifacts(args, cwd, env, buff, **kw): buff.write('checking job status...') @@ -325,7 +325,7 @@ def test_check_isolated_job_timeout(private_data_dir, rsa_key): mgr.started_at = time.time() mgr.host = 'isolated-host' - with mock.patch('awx.main.isolated.run.run_pexpect') as run_pexpect: + with mock.patch('awx.main.expect.run.run_pexpect') as run_pexpect: def _synchronize_job_artifacts(args, cwd, env, buff, **kw): buff.write('checking job status...') diff --git a/awx/main/tests/unit/test_tasks.py b/awx/main/tests/unit/test_tasks.py index 7e888942c4..99ad34d766 100644 --- a/awx/main/tests/unit/test_tasks.py +++ b/awx/main/tests/unit/test_tasks.py @@ -195,7 +195,7 @@ class TestJobExecution: # don't emit websocket statuses; they use the DB and complicate testing mock.patch.object(UnifiedJob, 'websocket_emit_status', mock.Mock()), mock.patch.object(Job, 'inventory', mock.Mock(pk=1, spec_set=['pk'])), - mock.patch('awx.main.isolated.run.run_pexpect', self.run_pexpect) + mock.patch('awx.main.expect.run.run_pexpect', self.run_pexpect) ] for p in self.patches: p.start() diff --git a/setup.py b/setup.py index 154caffca5..448491fa83 100755 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ class sdist_isolated(sdist): includes = [ 'include Makefile', 'include awx/__init__.py', - 'include awx/main/isolated/run.py', + 'include awx/main/expect/run.py', 'include tools/scripts/awx-expect', 'include requirements/requirements_isolated.txt', 'recursive-include awx/lib *.py', diff --git a/tools/docker-isolated-override.yml b/tools/docker-isolated-override.yml index 9b5242c009..9f9d473def 100644 --- a/tools/docker-isolated-override.yml +++ b/tools/docker-isolated-override.yml @@ -11,7 +11,7 @@ services: image: ${DEV_DOCKER_TAG_BASE}/awx_isolated:${TAG} hostname: isolated volumes: - - "../awx/main/isolated:/awx_devel" + - "../awx/main/expect:/awx_devel" - "../awx/lib:/awx_lib" - "/sys/fs/cgroup:/sys/fs/cgroup:ro" privileged: true