diff --git a/tests/integration/targets/ntnx_service_groups/tasks/create.yml b/tests/integration/targets/ntnx_service_groups/tasks/create.yml index 47b8759c..6afd4ece 100644 --- a/tests/integration/targets/ntnx_service_groups/tasks/create.yml +++ b/tests/integration/targets/ntnx_service_groups/tasks/create.yml @@ -152,7 +152,7 @@ - result.response.service_group.service_list[1].udp_port_range_list[2].start_port == 99 - result.response.service_group.service_list[1].udp_port_range_list[2].end_port == 99 - result.response.service_group.service_list[2].protocol == "ICMP" - - result.response.service_group.service_list[2].icmp_type_code_list == [] + - result.response.service_group.service_list[2].icmp_type_code_list == [{}] fail_msg: "Fail: Unable to create tcp service group " success_msg: "Pass: tcp service group created successfully" diff --git a/tests/integration/targets/ntnx_static_routes/tasks/create.yml b/tests/integration/targets/ntnx_static_routes/tasks/create.yml index a677ca55..b57f7b07 100644 --- a/tests/integration/targets/ntnx_static_routes/tasks/create.yml +++ b/tests/integration/targets/ntnx_static_routes/tasks/create.yml @@ -30,6 +30,36 @@ - result.response is defined - result.response.status.state == 'COMPLETE' - result.changed == true + - ("{{d1}}" == "10.2.2.0/24" and "{{d2}}" == "10.2.3.0/24") or ("{{d2}}" == "10.2.2.0/24" and "{{d1}}" == "10.2.3.0/24") + - result.response.status.resources.static_routes_list[0]["nexthop"]["external_subnet_reference"]["name"] == "{{ external_nat_subnet.name }}" + - result.response.status.resources.static_routes_list[1]["nexthop"]["external_subnet_reference"]["name"] == "{{ external_nat_subnet.name }}" + - result.response.status.resources.default_route["destination"] == "0.0.0.0/0" + - result.response.status.resources.default_route["nexthop"]["external_subnet_reference"]["name"] == "{{ external_nat_subnet.name }}" + + fail_msg: "Fail: Unable to update static routes of vpc" + success_msg: "Succes: static routes updated successfully" + +- name: Wait 1 minute for static routes to be become active + pause: + seconds: 60 + +- name: get all static routes + ntnx_static_routes_info: + vpc_uuid: "{{ vpc.uuid }}" + register: result + +- set_fact: + d1: "{{ result.response.status.resources.static_routes_list[0].destination }}" + d2: "{{ result.response.status.resources.static_routes_list[1].destination }}" + +- debug: + msg: "{{ result }}" + +- name: check info module response + assert: + that: + - result.response is defined + - result.changed == false - result.response.status.resources.static_routes_list[0]["is_active"] == true - ("{{d1}}" == "10.2.2.0/24" and "{{d2}}" == "10.2.3.0/24") or ("{{d2}}" == "10.2.2.0/24" and "{{d1}}" == "10.2.3.0/24") - result.response.status.resources.static_routes_list[0]["nexthop"]["external_subnet_reference"]["name"] == "{{ external_nat_subnet.name }}" @@ -39,8 +69,8 @@ - result.response.status.resources.default_route["destination"] == "0.0.0.0/0" - result.response.status.resources.default_route["nexthop"]["external_subnet_reference"]["name"] == "{{ external_nat_subnet.name }}" - fail_msg: 'Fail: Unable to update static routes of vpc' - success_msg: 'Succes: static routes updated successfully' + fail_msg: "Fail: Unable to get static routes for vpc" + success_msg: "Succes" ########################################################################################################### @@ -89,12 +119,32 @@ - result.response is defined - result.response.status.state == 'COMPLETE' - result.changed == true - - result.response.status.resources.static_routes_list[0]["is_active"] == true - result.response.status.resources.static_routes_list[0]["destination"] == "10.2.4.0/24" - result.response.status.resources.static_routes_list[0]["nexthop"]["external_subnet_reference"]["name"] == "{{ external_nat_subnet.name }}" fail_msg: "Static routes overriding failed" success_msg: "Static routes overridden successfully" +- name: Wait 1 minute for static routes to be become active + pause: + seconds: 60 + +- name: get all static routes + ntnx_static_routes_info: + vpc_uuid: "{{ vpc.uuid }}" + register: result + +- set_fact: + d1: "{{ result.response.status.resources.static_routes_list[0].destination }}" + +- name: check info module response + assert: + that: + - result.response is defined + - result.changed == false + - result.response.status.resources.static_routes_list[0]["is_active"] == true + - result.response.status.resources.static_routes_list[0]["destination"] == "10.2.4.0/24" + - result.response.status.resources.static_routes_list[0]["nexthop"]["external_subnet_reference"]["name"] == "{{ external_nat_subnet.name }}" + ########################################################################################################### - name: Netgative scenario of creating multiple default routes diff --git a/tests/integration/targets/ntnx_static_routes_info/tasks/info.yml b/tests/integration/targets/ntnx_static_routes_info/tasks/info.yml index 4b79f1a0..589b45e2 100644 --- a/tests/integration/targets/ntnx_static_routes_info/tasks/info.yml +++ b/tests/integration/targets/ntnx_static_routes_info/tasks/info.yml @@ -30,6 +30,10 @@ ########################################################################################################### +- name: Wait 60 seconds for static routes to be created + pause: + seconds: 60 + - name: get all static routes ntnx_static_routes_info: vpc_uuid: "{{ vpc.uuid }}"