def test_update_listener_hostname_names_changed( lb_client, create_or_update_lb_resources_and_wait_patch): updated_hostname_names = dict({"hostname_names": ["host_name_002"]}) module = get_module(updated_hostname_names) create_or_update_lb_resources_and_wait_patch.return_value = { "listener": to_dict(get_listener()), "changed": True, } oci_load_balancer_listener.update_listener(lb_client, module, get_listener(), "ocid1.loadbalancer.aaaa", "ansible_listener") assert create_or_update_lb_resources_and_wait_patch.called
def test_update_listener(lb_client, create_or_update_lb_resources_and_wait_patch): updated_backend_set_name = dict({"default_backend_set_name": "backend2"}) module = get_module(updated_backend_set_name) create_or_update_lb_resources_and_wait_patch.return_value = { "listener": to_dict(get_listener()), "changed": True, } oci_load_balancer_listener.update_listener(lb_client, module, get_listener(), "ocid1.loadbalancer.aaaa", "ansible_listener") assert create_or_update_lb_resources_and_wait_patch.called
def test_update_listener_hostname_names_changed( lb_client, create_or_update_lb_resources_and_wait_patch): updated_hostname_names = dict({'hostname_names': ['host_name_002']}) module = get_module(updated_hostname_names) create_or_update_lb_resources_and_wait_patch.return_value = { 'listener': to_dict(get_listener()), 'changed': True } oci_load_balancer_listener.update_listener(lb_client, module, get_listener(), 'ocid1.loadbalancer.aaaa', 'ansible_listener') assert create_or_update_lb_resources_and_wait_patch.called
def test_update_listener(lb_client, create_or_update_lb_resources_and_wait_patch): updated_backend_set_name = dict({'default_backend_set_name': 'backend2'}) module = get_module(updated_backend_set_name) create_or_update_lb_resources_and_wait_patch.return_value = { 'listener': to_dict(get_listener()), 'changed': True } oci_load_balancer_listener.update_listener(lb_client, module, get_listener(), 'ocid1.loadbalancer.aaaa', 'ansible_listener') assert create_or_update_lb_resources_and_wait_patch.called
def test_update_listener_connection_configuration_changed( lb_client, create_or_update_lb_resources_and_wait_patch): updated_backend_set_name = dict( {"connection_configuration": { "idle_timeout": 600 }}) module = get_module(updated_backend_set_name) create_or_update_lb_resources_and_wait_patch.return_value = { "listener": to_dict(get_listener()), "changed": True, } oci_load_balancer_listener.update_listener(lb_client, module, get_listener(), "ocid1.loadbalancer.aaaa", "ansible_listener") assert create_or_update_lb_resources_and_wait_patch.called
def test_update_listener_connection_configuration_changed( lb_client, create_or_update_lb_resources_and_wait_patch): updated_backend_set_name = dict( {'connection_configuration': { 'idle_timeout': 600 }}) module = get_module(updated_backend_set_name) create_or_update_lb_resources_and_wait_patch.return_value = { 'listener': to_dict(get_listener()), 'changed': True } oci_load_balancer_listener.update_listener(lb_client, module, get_listener(), 'ocid1.loadbalancer.aaaa', 'ansible_listener') assert create_or_update_lb_resources_and_wait_patch.called
def test_update_listener_ssl_config_changed( lb_client, create_or_update_lb_resources_and_wait_patch): updated_backend_set_name = dict({ "ssl_configuration": { "certificate_name": "test_cert1", "verify_depth": 2, "verify_peer_certificate": True, } }) module = get_module(updated_backend_set_name) create_or_update_lb_resources_and_wait_patch.return_value = { "listener": to_dict(get_listener()), "changed": True, } oci_load_balancer_listener.update_listener(lb_client, module, get_listener(), "ocid1.loadbalancer.aaaa", "ansible_listener") assert create_or_update_lb_resources_and_wait_patch.called
def test_update_listener_no_update(lb_client): module = get_module() result = oci_load_balancer_listener.update_listener( lb_client, module, get_listener(), "ocid1.loadbalancer.aaaa", "ansible_listener") assert result["changed"] is False
def test_update_listener_no_update(lb_client): module = get_module() result = oci_load_balancer_listener.update_listener( lb_client, module, get_listener(), 'ocid1.loadbalancer.aaaa', 'ansible_listener') assert result['changed'] is False