mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Remove receptor_address module from collection
After removing CRUD from receptor addresses, we need to remove the module. - remove receptor_address module - Add listener_port to instance module - Add peers_from_control_nodes to instance module Signed-off-by: Seth Foster <fosterbseth@gmail.com>
This commit is contained in:
@@ -248,8 +248,6 @@ def test_completeness(collection_import, request, admin_user, job_template, exec
|
||||
singular_endpoint = '{0}'.format(endpoint)
|
||||
if singular_endpoint.endswith('ies'):
|
||||
singular_endpoint = singular_endpoint[:-3]
|
||||
elif singular_endpoint.endswith('ses'): # receptor_addresses
|
||||
singular_endpoint = singular_endpoint[:-2]
|
||||
elif singular_endpoint != 'settings' and singular_endpoint.endswith('s'):
|
||||
singular_endpoint = singular_endpoint[:-1]
|
||||
module_name = '{0}'.format(singular_endpoint)
|
||||
|
||||
@@ -13,7 +13,7 @@ def test_peers_adding_and_removing(run_module, admin_user):
|
||||
with override_settings(IS_K8S=True):
|
||||
result = run_module(
|
||||
'instance',
|
||||
{'hostname': 'hopnode', 'node_type': 'hop', 'node_state': 'installed'},
|
||||
{'hostname': 'hopnode', 'node_type': 'hop', 'node_state': 'installed', 'listener_port': 6789},
|
||||
admin_user,
|
||||
)
|
||||
assert result['changed']
|
||||
@@ -22,19 +22,12 @@ def test_peers_adding_and_removing(run_module, admin_user):
|
||||
|
||||
assert hop_node.node_type == 'hop'
|
||||
|
||||
result = run_module(
|
||||
'receptor_address',
|
||||
{'address': 'hopnodeaddr', 'instance': 'hopnode', 'port': 6789},
|
||||
admin_user,
|
||||
)
|
||||
assert result['changed']
|
||||
|
||||
address = hop_node.receptor_addresses.get(pk=result.get('id'))
|
||||
assert address.port == 6789
|
||||
|
||||
result = run_module(
|
||||
'instance',
|
||||
{'hostname': 'executionnode', 'node_type': 'execution', 'node_state': 'installed', 'peers': ['hopnodeaddr']},
|
||||
{'hostname': 'executionnode', 'node_type': 'execution', 'node_state': 'installed', 'peers': ['hopnode']},
|
||||
admin_user,
|
||||
)
|
||||
assert result['changed']
|
||||
|
||||
Reference in New Issue
Block a user