diff --git a/awx_collection/plugins/module_utils/tower_api.py b/awx_collection/plugins/module_utils/tower_api.py index da56ad1d26..f6c63b08de 100644 --- a/awx_collection/plugins/module_utils/tower_api.py +++ b/awx_collection/plugins/module_utils/tower_api.py @@ -272,7 +272,9 @@ class TowerAPIModule(TowerModule): if self._COLLECTION_TYPE not in self.collection_to_version or self.collection_to_version[self._COLLECTION_TYPE] != tower_type: self.warn("You are using the {0} version of this collection but connecting to {1}".format(self._COLLECTION_TYPE, tower_type)) elif collection_compare_ver != tower_compare_ver: - self.warn("You are running collection version {0} but connecting to {2} version {1}".format(self._COLLECTION_VERSION, tower_version, tower_type)) + self.warn( + "You are running collection version {0} but connecting to {2} version {1}".format(self._COLLECTION_VERSION, tower_version, tower_type) + ) self.version_checked = True diff --git a/awx_collection/test/awx/test_module_utils.py b/awx_collection/test/awx/test_module_utils.py index 8f2a8e52d5..89bd44154e 100644 --- a/awx_collection/test/awx/test_module_utils.py +++ b/awx_collection/test/awx/test_module_utils.py @@ -59,7 +59,7 @@ def test_version_warning(collection_import, silence_warning): my_module._COLLECTION_TYPE = "awx" my_module.get_endpoint('ping') silence_warning.assert_called_once_with( - 'You are running collection version {} but connecting to tower version {}'.format(my_module._COLLECTION_VERSION, ping_version) + 'You are running collection version {} but connecting to {} version {}'.format(my_module._COLLECTION_VERSION, awx_name, ping_version) ) @@ -107,7 +107,7 @@ def test_version_warning_strictness_tower(collection_import, silence_warning): my_module._COLLECTION_TYPE = "tower" my_module.get_endpoint('ping') silence_warning.assert_called_once_with( - 'You are running collection version {} but connecting to tower version {}'.format(my_module._COLLECTION_VERSION, ping_version) + 'You are running collection version {} but connecting to {} version {}'.format(my_module._COLLECTION_VERSION, tower_name, ping_version) ) diff --git a/awx_collection/tests/integration/targets/tower_project_manual/tasks/create_project_dir.yml b/awx_collection/tests/integration/targets/tower_project_manual/tasks/create_project_dir.yml index ef15df8c50..807c604dd9 100644 --- a/awx_collection/tests/integration/targets/tower_project_manual/tasks/create_project_dir.yml +++ b/awx_collection/tests/integration/targets/tower_project_manual/tasks/create_project_dir.yml @@ -40,7 +40,7 @@ job_type: run module_args: "mkdir -p {{ project_base_dir }}/{{ project_dir_name }}" module_name: command - wait: True + wait: true always: - name: Delete path from setting