diff options
Diffstat (limited to '')
-rw-r--r-- | debian/tests/control | 41 | ||||
-rwxr-xr-x | debian/tests/unit-tests-base | 10 | ||||
-rwxr-xr-x | debian/tests/unit-tests-flaky | 43 | ||||
-rwxr-xr-x | debian/tests/unit-tests-stable | 61 |
4 files changed, 155 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 00000000..75b6d5b8 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,41 @@ +Tests: unit-tests-base +# Dependencies sourced from: +# - test/lib/ansible_test/_data/requirements/units.txt +# - test/units/requirements.txt +Depends: @, + git, + python3-crypto, + python3-cryptography, + python3-jinja2, + python3-mock, + python3-passlib, + python3-pexpect, + python3-pycryptodome, + python3-pytest, + python3-pytest-mock, + python3-pytest-xdist, + python3-tz, + python3-winrm, + python3-yaml + +Tests: unit-tests-stable +Depends: @, + git, + python3-boto3, + python3-flake8, + python3-mock, + python3-pytest-mock, + python3-pytest-xdist, + yamllint + +# failing tests due to missing packages or other reasons +Tests: unit-tests-flaky +Depends: @, + git, + python3-boto3, + python3-flake8, + python3-mock, + python3-pytest-xdist, + python3-pyvmomi, + yamllint +Restrictions: flaky diff --git a/debian/tests/unit-tests-base b/debian/tests/unit-tests-base new file mode 100755 index 00000000..2ac5146a --- /dev/null +++ b/debian/tests/unit-tests-base @@ -0,0 +1,10 @@ +#!/bin/sh + +/usr/bin/ansible-test units \ + --python-interpreter /usr/bin/python3 \ + --python 3.9 \ + --local \ + --exclude test/units/cli/test_galaxy.py \ + --exclude test/units/galaxy/test_collection_install.py \ + --exclude test/units/modules/test_async_wrapper.py \ + --exclude test/units/utils/collection_loader/test_collection_loader.py \ diff --git a/debian/tests/unit-tests-flaky b/debian/tests/unit-tests-flaky new file mode 100755 index 00000000..3da64b22 --- /dev/null +++ b/debian/tests/unit-tests-flaky @@ -0,0 +1,43 @@ +#!/bin/sh + +# Don't let them fail +# set -e + +BASEPATH=$(pwd) + +unit_test_dirs=" +ansible_collections/ngine_io/cloudstack # missing python3-units +ansible_collections/ansible/netcommon # test broken +ansible_collections/netapp/ontap # missing netapp_lib +ansible_collections/netapp_eseries/santricity # missing python3-units +ansible_collections/community/aws # import broken +ansible_collections/community/vmware # missing python3-units +ansible_collections/community/hrobot # import broken +ansible_collections/community/general # import broken +ansible_collections/community/skydive # STDERR: WARNING: All targets skipped. +ansible_collections/junipernetworks/junos # test broken +ansible_collections/dellemc/os6 # import broken +ansible_collections/dellemc/os10 # missing python3-units +ansible_collections/dellemc/os9 # import broken +" + +for i in $unit_test_dirs; do + + cd $i 2> /dev/null || continue + + echo "\n\n" + echo "############################################################" + echo "############################################################" + echo "#### Running FLAKY tests in $i" + echo "############################################################" + echo "############################################################" + + /usr/bin/ansible-test units \ + --python-interpreter /usr/bin/python3 \ + --python 3.9 \ + --local + + cd $BASEPATH +done + +exit 0 diff --git a/debian/tests/unit-tests-stable b/debian/tests/unit-tests-stable new file mode 100755 index 00000000..71865830 --- /dev/null +++ b/debian/tests/unit-tests-stable @@ -0,0 +1,61 @@ +#!/bin/sh + +set -e + +BASEPATH=$(pwd) + +unit_test_dirs=" +ansible_collections/amazon/aws +ansible_collections/ansible/posix +ansible_collections/ansible/windows +ansible_collections/arista/eos +ansible_collections/cisco/aci +ansible_collections/cisco/asa +ansible_collections/cisco/ios +ansible_collections/cisco/iosxr +ansible_collections/cisco/nso +ansible_collections/cisco/nxos +ansible_collections/community/crypto +ansible_collections/community/docker +ansible_collections/community/fortios +ansible_collections/community/google +ansible_collections/community/grafana +ansible_collections/community/kubevirt +ansible_collections/community/libvirt +ansible_collections/community/mysql +ansible_collections/community/network +ansible_collections/community/postgresql +ansible_collections/community/rabbitmq +ansible_collections/community/routeros +ansible_collections/community/windows +ansible_collections/f5networks/f5_modules +ansible_collections/frr/frr +ansible_collections/google/cloud +ansible_collections/mellanox/onyx +ansible_collections/netapp/aws +ansible_collections/netapp/elementsw +ansible_collections/netbox/netbox +ansible_collections/openvswitch/openvswitch +ansible_collections/vyos/vyos +" + +for i in $unit_test_dirs; do + + cd $i 2> /dev/null || continue + + echo "\n\n" + echo "############################################################" + echo "############################################################" + echo "#### Running tests in $i" + echo "############################################################" + echo "############################################################" + + /usr/bin/ansible-test units \ + --python-interpreter /usr/bin/python3 \ + --python 3.9 \ + --local + + cd $BASEPATH +done + +exit 0 |