diff options
author | Matt Clay <mclay@redhat.com> | 2020-02-24 17:31:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-24 17:31:14 -0800 |
commit | 4e571248a906bd461a547ab50e64573a644834b6 (patch) | |
tree | 3f7ac6c681aa7805423e89c2c142f2a298663fbe /test/utils/shippable | |
parent | 81ffc315a440f37c5a77ab015b9954704f1d5c6c (diff) | |
download | ansible-4e571248a906bd461a547ab50e64573a644834b6.tar.gz |
First batch of incidental integration tests. (#67717)
* Initial copy of incidental network tests.
* Update incidental test aliases.
* Add incidental tests to CI.
* Rewrite module references in tests.
This should not be necessary once module redirection is supported.
* Rewrite target references for renamed targets.
* Add support collections for incidental tests.
* Add ignores for test support code.
* Remove echo used for debugging.
Diffstat (limited to 'test/utils/shippable')
-rwxr-xr-x | test/utils/shippable/i.sh | 14 | ||||
l--------- | test/utils/shippable/incidental/ios.sh | 1 | ||||
-rwxr-xr-x | test/utils/shippable/incidental/network.sh | 46 | ||||
l--------- | test/utils/shippable/incidental/vyos.sh | 1 |
4 files changed, 62 insertions, 0 deletions
diff --git a/test/utils/shippable/i.sh b/test/utils/shippable/i.sh new file mode 100755 index 0000000000..efa2866d2e --- /dev/null +++ b/test/utils/shippable/i.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# Temporary script to support side-by-side testing for incidental code coverage. +# Once collection migration has been completed the incidental tests can be combined with the regular tests. + +set -o pipefail -eux + +declare -a args +IFS='/:' read -ra args <<< "$1" + +script="${args[1]}" + +IFS='/' test="${args[*]:1}" + +"test/utils/shippable/incidental/${script}.sh" "${test}" diff --git a/test/utils/shippable/incidental/ios.sh b/test/utils/shippable/incidental/ios.sh new file mode 120000 index 0000000000..cad3e41b70 --- /dev/null +++ b/test/utils/shippable/incidental/ios.sh @@ -0,0 +1 @@ +network.sh
\ No newline at end of file diff --git a/test/utils/shippable/incidental/network.sh b/test/utils/shippable/incidental/network.sh new file mode 100755 index 0000000000..f46c5013f6 --- /dev/null +++ b/test/utils/shippable/incidental/network.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +set -o pipefail -eux + +declare -a args +IFS='/:' read -ra args <<< "$1" + +platform="${args[0]}" +version="${args[1]}" +python_version="${args[2]}" + +target="shippable/${platform}/incidental/" + +stage="${S:-prod}" +provider="${P:-default}" + +# python versions to test in order +# all versions run full tests +python_versions=( + 2.7 + 3.6 +) + +if [ "${python_version}" ]; then + # limit tests to a single python version + python_versions=("${python_version}") +fi + +for python_version in "${python_versions[@]}"; do + # terminate remote instances on the final python version tested + if [ "${python_version}" = "${python_versions[-1]}" ]; then + terminate="always" + else + terminate="never" + fi + + # shellcheck disable=SC2086 + ansible-test network-integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \ + --platform "${platform}/${version}" \ + --platform-connection "${platform}=ansible.netcommon.network_cli" \ + --platform-collection "vyos=vyos.vyos" \ + --platform-collection "ios=cisco.ios" \ + --enable-test-support \ + --docker default --python "${python_version}" \ + --remote-terminate "${terminate}" --remote-stage "${stage}" --remote-provider "${provider}" +done diff --git a/test/utils/shippable/incidental/vyos.sh b/test/utils/shippable/incidental/vyos.sh new file mode 120000 index 0000000000..cad3e41b70 --- /dev/null +++ b/test/utils/shippable/incidental/vyos.sh @@ -0,0 +1 @@ +network.sh
\ No newline at end of file |