Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Integration Fixes: Enhancing Stability #510

Open
wants to merge 2 commits into
base: release/1.9.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
56 changes: 53 additions & 3 deletions tests/integration/targets/ntnx_static_routes/tasks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
george-ghawali marked this conversation as resolved.
Show resolved Hide resolved

- 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 }}"
Expand All @@ -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"
george-ghawali marked this conversation as resolved.
Show resolved Hide resolved

###########################################################################################################

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
Loading