ogenstad / test-network-modules

Playbooks for testing Ansible core network modules

Home Page:http://docs.ansible.com/ansible/list_of_network_modules.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test-network-modules

Playbooks for testing Ansible network modules

$ ansible-playbook all.yaml

To filter a set of test cases set limit_to to the name of the group (i.e. command, section, eapi, etc.):

$ ansible-playbook all.yaml -e "limit_to=eos_command"

To filter a singular test case set the tags options to eapi or cli, set limit_to to the test group, and test_cases to the name of the test:

$ ansible-playbook all.yaml --tags="cli" -e "limit_to=eos_command test_case=notequal"

Contributing Test Cases

Test cases are added to roles based on the module being testing. Test cases should include both cli and nxapi test cases. Cli test cases should be added to role/tests/cli and eapi tests should be added to role/tests/eapi.

Conventions

  • Each test case should generally follow the pattern:

    setup —> test —> assert —> test again (idempotent) —> assert —> done

    This keeps test playbooks from becoming monolithic and difficult to troubleshoot.

  • Include a name for each task that is not an assertion. (It's OK to add names to assertsion too. But to make it easy to identify the broken task within a failed test, at least provide a helpful name for each task.)

License

Provided under the GPLv3 license.

Authors

Created and sponsored by RedHat | Ansible.

About

Playbooks for testing Ansible core network modules

http://docs.ansible.com/ansible/list_of_network_modules.html

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%