From 67590e4e35cf66712dcb4c720a8bc8a2cf92009f Mon Sep 17 00:00:00 2001 From: John R Barker Date: Fri, 9 Feb 2018 16:17:34 +0000 Subject: [PATCH] Test against a single transport (#35903) (#35970) Network integration tests can use tags to run only a specific transport (cherry picked from commit c3523cdd60e8c03685d3cdf1857dbb89e3941392) --- docs/docsite/rst/dev_guide/testing_integration.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/docsite/rst/dev_guide/testing_integration.rst b/docs/docsite/rst/dev_guide/testing_integration.rst index 101e3c5673..82482b37e8 100644 --- a/docs/docsite/rst/dev_guide/testing_integration.rst +++ b/docs/docsite/rst/dev_guide/testing_integration.rst @@ -195,7 +195,7 @@ For guidance on writing network test see the `adding tests for Network modules g Running network integration tests locally ----------------------------------------- -Ansible uses Shippable to run an integration test suite on every PR, including new tests introduced by that PR. To find and fix problems in network modules, run the network integration test locally before you submit a PR. +Ansible uses Shippable to run an integration test suite on every PR, including new tests introduced by that PR. To find and fix problems in network modules, run the network integration test locally before you submit a PR. To run the network integration tests, use a command in the form:: @@ -219,6 +219,15 @@ To run integration tests for a specific module:: ansible-test network-integration --inventory /path/to/ansible/test/integration/inventory.networking vyos_vlan +To run integration tests for a specific transport:: + + # Only run nxapi test + ansible-test network-integration --inventory /path/to/ansible/test/integration/inventory.networking --tags="nxapi" nxos_.* + + # Skip any cli tests + ansible-test network-integration --inventory /path/to/ansible/test/integration/inventory.networking --skip-tags="cli" nxos_.* + +See `test/integration/targets/nxos_bgp/tasks/main.yaml `_ for how this is implemented in the tests. For more options::