Skip to content
Snippets Groups Projects
Commit 68c36249 authored by ME's avatar ME
Browse files

test

parent 266a98e2
No related branches found
No related tags found
No related merge requests found
......@@ -63,19 +63,16 @@
# ROUTES: The number of advertised and received routes must be within 5% difference with the previous state
- name: Compare the number of received routes
ansible.builtin.assert:
that:
- "((pre_check[check_id]['bgp_rec_routes'] - post_check[check_id]['bgp_rec_routes']) / pre_check[check_id]['bgp_rec_routes']) * 100 | abs <= 5"
fail_msg: "FAIL: the number of received routes isn't within 5% of difference"
success_msg: "PASS: the number of received routes is within 5% of difference"
# when:
# - post_check[check_id]['bgp_rec_routes'] is defined
# - pre_check[check_id]['bgp_rec_routes'] is defined
- name: Compare the number of advertised routes
ansible.builtin.assert:
that:
- "{{ ((pre_check.{{ check_id }}.bgp_adv_routes - post_check.{{ check_id }}.bgp_adv_routes) / pre_check.{{ check_id }}.bgp_adv_routes) * 100 | abs }} <= 5"
- "((pre_check.{{ check_id }}.bgp_adv_routes - post_check.{{ check_id }}.bgp_adv_routes) / pre_check.{{ check_id }}.bgp_adv_routes) * 100 | abs <= 5"
fail_msg: "FAIL: the number of advertised routes isn't within 5% of difference"
success_msg: "PASS: the number of advertised routes is within 5% of difference"
- name: Compare the number of received routes
ansible.builtin.assert:
that:
- "((pre_check.{{ check_id }}.bgp_rec_routes - post_check.{{ check_id }}.bgp_rec_routes) / pre_check.{{ check_id }}.bgp_rec_routes) * 100 | abs <= 5"
fail_msg: "FAIL: the number of received routes isn't within 5% of difference"
success_msg: "PASS: the number of received routes is within 5% of difference"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment