mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Update unit test to pull in product names that are no longer hardcoded
This commit is contained in:
parent
f38c9e7478
commit
b681d1078f
@ -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
|
||||
|
||||
|
||||
@ -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)
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user