1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Continue running network tests after failure (#26407)

Previously tests would stop running on the first failure.
With this PR we move onto running the tests for the next module. This
allows DCI runs to have a fuller picture of what's broken.

This only effects manual and DCI runs, it doesn't effect Shippable runs
as this the modules are tested directly.
This commit is contained in:
John R Barker 2017-07-04 18:18:02 +01:00 committed by GitHub
parent 1a9b0ae731
commit 50f2313b47
10 changed files with 596 additions and 77 deletions

View file

@ -7,7 +7,36 @@
limit_to: "*" limit_to: "*"
debug: false debug: false
roles: # Run the tests within blocks allows the the next module to be tested if the previous one fails.
- { role: asa_command, when: "limit_to in ['*', 'asa_command']" } # This is done to allow https://github.com/ansible/dci-partner-ansible/ to run the full set of tests.
- { role: asa_config, when: "limit_to in ['*', 'asa_config']" }
- { role: asa_acl, when: "limit_to in ['*', 'asa_acl']" }
tasks:
- set_fact:
test_failed: false
- block:
- include_role:
name: asa_command
when: "limit_to in ['*', 'asa_command']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: asa_config
when: "limit_to in ['*', 'asa_config']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: asa_acl
when: "limit_to in ['*', 'asa_acl']"
rescue:
- set_fact: test_failed=true
###########
- name: Has any previous test failed?
fail:
msg: "One or more tests failed, check log for details"
when: test_failed

View file

@ -7,14 +7,86 @@
limit_to: "*" limit_to: "*"
debug: false debug: false
roles: # Run the tests within blocks allows the the next module to be tested if the previous one fails.
- { role: eos_banner, when: "limit_to in ['*', 'eos_banner']" } # This is done to allow https://github.com/ansible/dci-partner-ansible/ to run the full set of tests.
- { role: eos_command, when: "limit_to in ['*', 'eos_command']" }
- { role: eos_config, when: "limit_to in ['*', 'eos_config']" }
- { role: eos_template, when: "limit_to in ['*', 'eos_template']" } tasks:
- { role: eos_facts, when: "limit_to in ['*', 'eos_facts']" } - set_fact:
- { role: eos_eapi, debug: yes, when: "limit_to in ['*', 'eos_eapi']" } test_failed: false
- { role: eos_system, debug: yes, when: "limit_to in ['*', 'eos_system']" } - block:
- { role: eos_user, when: "limit_to in ['*', 'eos_user']" } - include_role:
- { role: eos_vlan, debug: yes, when: "limit_to in ['*', 'eos_vlan']" } name: eos_banner
- { role: eos_vrf, debug: yes, when: "limit_to in ['*', 'eos_vrf']" } when: "limit_to in ['*', 'eos_banner']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: eos_command
when: "limit_to in ['*', 'eos_command']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: eos_config
when: "limit_to in ['*', 'eos_config']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: eos_template
when: "limit_to in ['*', 'eos_template']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: eos_facts
when: "limit_to in ['*', 'eos_facts']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: eos_eapi
when: "limit_to in ['*', 'eos_eapi']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: eos_system
when: "limit_to in ['*', 'eos_system']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: eos_user
when: "limit_to in ['*', 'eos_user']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: eos_vlan
when: "limit_to in ['*', 'eos_vlan']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: eos_vrf
when: "limit_to in ['*', 'eos_vrf']"
rescue:
- set_fact: test_failed=true
###########
- name: Has any previous test failed?
fail:
msg: "One or more tests failed, check log for details"
when: test_failed

View file

@ -6,13 +6,72 @@
vars: vars:
limit_to: "*" limit_to: "*"
debug: false debug: false
# Run the tests within blocks allows the the next module to be tested if the previous one fails.
# This is done to allow https://github.com/ansible/dci-partner-ansible/ to run the full set of tests.
roles:
- { role: ios_banner, when: "limit_to in ['*', 'ios_banner']" } tasks:
- { role: ios_command, when: "limit_to in ['*', 'ios_command']" } - set_fact:
- { role: ios_config, when: "limit_to in ['*', 'ios_config']" } test_failed: false
- { role: ios_facts, when: "limit_to in ['*', 'ios_facts']" } - block:
- { role: ios_template, when: "limit_to in ['*', 'ios_template']" } - include_role:
- { role: ios_system, when: "limit_to in ['*', 'ios_system']" } name: ios_banner
- { role: ios_user, when: "limit_to in ['*', 'ios_user']" } when: "limit_to in ['*', 'ios_banner']"
- { role: ios_static_route, when: "limit_to in ['*', 'ios_static_route']" } rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: ios_command
when: "limit_to in ['*', 'ios_command']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: ios_config
when: "limit_to in ['*', 'ios_config']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: ios_facts
when: "limit_to in ['*', 'ios_facts']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: ios_template
when: "limit_to in ['*', 'ios_template']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: ios_system
when: "limit_to in ['*', 'ios_system']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: ios_user
when: "limit_to in ['*', 'ios_user']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: ios_static_route
when: "limit_to in ['*', 'ios_static_route']"
rescue:
- set_fact: test_failed=true
###########
- name: Has any previous test failed?
fail:
msg: "One or more tests failed, check log for details"
when: test_failed

View file

@ -7,11 +7,64 @@
limit_to: "*" limit_to: "*"
debug: false debug: false
roles: # Run the tests within blocks allows the the next module to be tested if the previous one fails.
- { role: iosxr_command, when: "limit_to in ['*', 'iosxr_command']" } # This is done to allow https://github.com/ansible/dci-partner-ansible/ to run the full set of tests.
- { role: iosxr_config, when: "limit_to in ['*', 'iosxr_config']" }
- { role: iosxr_facts, when: "limit_to in ['*', 'iosxr_facts']" }
- { role: iosxr_template, when: "limit_to in ['*', 'iosxr_template']" } tasks:
- { role: iosxr_system, when: "limit_to in ['*', 'iosxr_system']" } - set_fact:
- { role: iosxr_user, when: "limit_to in ['*', 'iosxr_user']" } test_failed: false
- { role: iosxr_banner, when: "limit_to in ['*', 'iosxr_banner']" } - block:
- include_role:
name: iosxr_command
when: "limit_to in ['*', 'iosxr_command']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: iosxr_config
when: "limit_to in ['*', 'iosxr_config']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: iosxr_facts
when: "limit_to in ['*', 'iosxr_facts']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: iosxr_template
when: "limit_to in ['*', 'iosxr_template']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: iosxr_system
when: "limit_to in ['*', 'iosxr_system']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: iosxr_user
when: "limit_to in ['*', 'iosxr_user']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: iosxr_banner
when: "limit_to in ['*', 'iosxr_banner']"
rescue:
- set_fact: test_failed=true
###########
- name: Has any previous test failed?
fail:
msg: "One or more tests failed, check log for details"
when: test_failed

View file

@ -7,15 +7,93 @@
limit_to: "*" limit_to: "*"
debug: false debug: false
roles:
- { role: junos_command, when: "limit_to in ['*', 'junos_command']" } # Run the tests within blocks allows the the next module to be tested if the previous one fails.
- { role: junos_config, when: "limit_to in ['*', 'junos_config']" } # This is done to allow https://github.com/ansible/dci-partner-ansible/ to run the full set of tests.
- { role: junos_facts, when: "limit_to in ['*', 'junos_facts']" }
- { role: junos_netconf, when: "limit_to in ['*', 'junos_netconf']" }
- { role: junos_rpc, when: "limit_to in ['*', 'junos_rpc']" } tasks:
- { role: junos_template, when: "limit_to in ['*', 'junos_template']" } - set_fact:
- { role: junos_vlan, when: "limit_to in ['*', 'junos_vlan']" } test_failed: false
- { role: junos_interface, when: "limit_to in ['*', 'junos_interface']" } - block:
- { role: junos_banner, when: "limit_to in ['*', 'junos_banner']" } - include_role:
- { role: junos_system, when: "limit_to in ['*', 'junos_system']" } name: junos_command
- { role: junos_logging, when: "limit_to in ['*', 'junos_logging']" } when: "limit_to in ['*', 'junos_command']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: junos_config
when: "limit_to in ['*', 'junos_config']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: junos_facts
when: "limit_to in ['*', 'junos_facts']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: junos_netconf
when: "limit_to in ['*', 'junos_netconf']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: junos_rpc
when: "limit_to in ['*', 'junos_rpc']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: junos_template
when: "limit_to in ['*', 'junos_template']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: junos_vlan
when: "limit_to in ['*', 'junos_vlan']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: junos_interface
when: "limit_to in ['*', 'junos_interface']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: junos_banner
when: "limit_to in ['*', 'junos_banner']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: junos_system
when: "limit_to in ['*', 'junos_system']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: junos_logging
when: "limit_to in ['*', 'junos_logging']"
rescue:
- set_fact: test_failed=true
###########
- name: Has any previous test failed?
fail:
msg: "One or more tests failed, check log for details"
when: test_failed

View file

@ -7,17 +7,107 @@
limit_to: "*" limit_to: "*"
debug: false debug: false
roles: # Run the tests within blocks allows the the next module to be tested if the previous one fails.
- { role: nxos_command, when: "limit_to in ['*', 'nxos_command']" } # This is done to allow https://github.com/ansible/dci-partner-ansible/ to run the full set of tests.
- { role: nxos_config, when: "limit_to in ['*', 'nxos_config']" }
- { role: nxos_facts, when: "limit_to in ['*', 'nxos_facts']" }
- { role: nxos_template, when: "limit_to in ['*', 'nxos_template']" } tasks:
- { role: nxos_nxapi, when: "limit_to in ['*', 'nxos_nxapi']" } - set_fact:
- { role: nxos_evpn_global, when: "limit_to in ['*', 'nxos_evpn_global']" } test_failed: false
- { role: nxos_feature, when: "limit_to in ['*', 'nxos_feature']" } - block:
- { role: nxos_mtu, when: "limit_to in ['*', 'nxos_mtu']" } - include_role:
- { role: nxos_system, when: "limit_to in ['*', 'nxos_system']" } name: nxos_command
- { role: nxos_interface, when: "limit_to in ['*', 'nxos_interface']" } when: "limit_to in ['*', 'nxos_command']"
- { role: nxos_user, when: "limit_to in ['*', 'nxos_user']" } rescue:
- { role: nxos_banner, when: "limit_to in ['*', 'nxos_banner']" } - set_fact: test_failed=true
- { role: nxos_acl, when: "limit_to in ['*', 'nxos_acl']" }
- block:
- include_role:
name: nxos_config
when: "limit_to in ['*', 'nxos_config']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: nxos_facts
when: "limit_to in ['*', 'nxos_facts']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: nxos_template
when: "limit_to in ['*', 'nxos_template']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: nxos_nxapi
when: "limit_to in ['*', 'nxos_nxapi']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: nxos_evpn_global
when: "limit_to in ['*', 'nxos_evpn_global']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: nxos_feature
when: "limit_to in ['*', 'nxos_feature']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: nxos_mtu
when: "limit_to in ['*', 'nxos_mtu']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: nxos_system
when: "limit_to in ['*', 'nxos_system']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: nxos_interface
when: "limit_to in ['*', 'nxos_interface']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: nxos_user
when: "limit_to in ['*', 'nxos_user']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: nxos_banner
when: "limit_to in ['*', 'nxos_banner']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: nxos_acl
when: "limit_to in ['*', 'nxos_acl']"
rescue:
- set_fact: test_failed=true
###########
- name: Has any previous test failed?
fail:
msg: "One or more tests failed, check log for details"
when: test_failed

View file

@ -7,5 +7,23 @@
limit_to: "*" limit_to: "*"
debug: false debug: false
roles: # Run the tests within blocks allows the the next module to be tested if the previous one fails.
- { role: ops_command, when: "limit_to in ['*', 'ops_command']" } # This is done to allow https://github.com/ansible/dci-partner-ansible/ to run the full set of tests.
tasks:
- set_fact:
test_failed: false
- block:
- include_role:
name: ops_command
when: "limit_to in ['*', 'ops_command']"
rescue:
- set_fact: test_failed=true
###########
- name: Has any previous test failed?
fail:
msg: "One or more tests failed, check log for details"
when: test_failed

View file

@ -8,5 +8,23 @@
limit_to: "*" limit_to: "*"
debug: false debug: false
roles: # Run the tests within blocks allows the the next module to be tested if the previous one fails.
- { role: openvswitch_db, when: "limit_to in ['*', 'openvswitch_db']" } # This is done to allow https://github.com/ansible/dci-partner-ansible/ to run the full set of tests.
tasks:
- set_fact:
test_failed: false
- block:
- include_role:
name: openvswitch_db
when: "limit_to in ['*', 'openvswitch_db']"
rescue:
- set_fact: test_failed=true
###########
- name: Has any previous test failed?
fail:
msg: "One or more tests failed, check log for details"
when: test_failed

View file

@ -7,13 +7,79 @@
limit_to: "*" limit_to: "*"
debug: false debug: false
roles:
- { role: net_system, when: "limit_to in ['*', 'net_system']" } # Run the tests within blocks allows the the next module to be tested if the previous one fails.
- { role: net_banner, when: "limit_to in ['*', 'net_banner']" } # This is done to allow https://github.com/ansible/dci-partner-ansible/ to run the full set of tests.
- { role: net_command, when: "limit_to in ['*', 'net_command']" }
- { role: net_user, when: "limit_to in ['*', 'net_user']" }
- { role: net_vlan, when: "limit_to in ['*', 'net_vlan']" } tasks:
- { role: net_vrf, when: "limit_to in ['*', 'net_vrf']" } - set_fact:
- { role: net_interface, when: "limit_to in ['*', 'net_interface']" } test_failed: false
- { role: net_static_route, when: "limit_to in ['*', 'net_static_route']" } - block:
- { role: net_logging, when: "limit_to in ['*', 'net_logging']" } - include_role:
name: net_system
when: "limit_to in ['*', 'net_system']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: net_banner
when: "limit_to in ['*', 'net_banner']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: net_command
when: "limit_to in ['*', 'net_command']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: net_user
when: "limit_to in ['*', 'net_user']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: net_vlan
when: "limit_to in ['*', 'net_vlan']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: net_vrf
when: "limit_to in ['*', 'net_vrf']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: net_interface
when: "limit_to in ['*', 'net_interface']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: net_static_route
when: "limit_to in ['*', 'net_static_route']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: net_logging
when: "limit_to in ['*', 'net_logging']"
rescue:
- set_fact: test_failed=true
###########
- name: Has any previous test failed?
fail:
msg: "One or more tests failed, check log for details"
when: test_failed

View file

@ -7,8 +7,44 @@
limit_to: "*" limit_to: "*"
debug: false debug: false
roles: # Run the tests within blocks allows the the next module to be tested if the previous one fails.
- { role: vyos_command, when: "limit_to in ['*', 'vyos_command']" } # This is done to allow https://github.com/ansible/dci-partner-ansible/ to run the full set of tests.
- { role: vyos_config, when: "limit_to in ['*', 'vyos_config']" }
- { role: vyos_user, when: "limit_to in ['*', 'vyos_user']" }
- { role: vyos_banner, when: "limit_to in ['*', 'vyos_banner']" } tasks:
- set_fact:
test_failed: false
- block:
- include_role:
name: vyos_command
when: "limit_to in ['*', 'vyos_command']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: vyos_config
when: "limit_to in ['*', 'vyos_config']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: vyos_user
when: "limit_to in ['*', 'vyos_user']"
rescue:
- set_fact: test_failed=true
- block:
- include_role:
name: vyos_banner
when: "limit_to in ['*', 'vyos_banner']"
rescue:
- set_fact: test_failed=true
###########
- name: Has any previous test failed?
fail:
msg: "One or more tests failed, check log for details"
when: test_failed