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

Fix unit test paths in tests/utils/shippable/units.sh, removing fallaxy targets (#40)

* Fix unit test paths.

* Remove fallaxy targets.

* Remove unit test group 3.

* Avoid sanity tests to fail because they validate something in tests/utils/.
This commit is contained in:
Felix Fontein 2020-03-24 23:12:55 +01:00 committed by GitHub
parent a91ebb4e97
commit 927d91f35f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 27 deletions

View file

@ -30,14 +30,6 @@ matrix:
- env: T=units/3.8/2 - env: T=units/3.8/2
- env: T=units/3.9/2 - env: T=units/3.9/2
- env: T=units/2.6/3
- env: T=units/2.7/3
- env: T=units/3.5/3
- env: T=units/3.6/3
- env: T=units/3.7/3
- env: T=units/3.8/3
- env: T=units/3.9/3
- env: T=aix/7.2/1 - env: T=aix/7.2/1
- env: T=osx/10.11/1 - env: T=osx/10.11/1
- env: T=rhel/7.6/1 - env: T=rhel/7.6/1
@ -118,9 +110,6 @@ matrix:
- env: T=linux/ubuntu1604/5 - env: T=linux/ubuntu1604/5
- env: T=linux/ubuntu1804/5 - env: T=linux/ubuntu1804/5
- env: T=fallaxy/2.7/1
- env: T=fallaxy/3.6/1
- env: T=cs/2.7/1 - env: T=cs/2.7/1
- env: T=cs/3.6/1 - env: T=cs/3.6/1

View file

@ -35,4 +35,5 @@ fi
# shellcheck disable=SC2086 # shellcheck disable=SC2086
ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \ ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
--docker --base-branch "${base_branch}" \ --docker --base-branch "${base_branch}" \
--exclude shippable.yml --exclude tests/utils/ \
"${options[@]}" --allow-disabled "${options[@]}" --allow-disabled

View file

@ -18,7 +18,7 @@ group1=()
group2=() group2=()
group3=() group3=()
# create three groups by putting network tests into separate groups # create two groups by putting network tests into another group
# add or remove network platforms as needed to balance the groups # add or remove network platforms as needed to balance the groups
networks2=( networks2=(
@ -69,12 +69,8 @@ networks2=(
vyos vyos
) )
networks3=(
fortios
)
for network in "${networks2[@]}"; do for network in "${networks2[@]}"; do
test_path="test/units/modules/network/${network}/" test_path="tests/unit/modules/network/${network}/"
if [ -d "${test_path}" ]; then if [ -d "${test_path}" ]; then
group1+=(--exclude "${test_path}") group1+=(--exclude "${test_path}")
@ -82,19 +78,9 @@ for network in "${networks2[@]}"; do
fi fi
done done
for network in "${networks3[@]}"; do
test_path="test/units/modules/network/${network}/"
if [ -d "${test_path}" ]; then
group1+=(--exclude "${test_path}")
group3+=("${test_path}")
fi
done
case "${group}" in case "${group}" in
1) options=("${group1[@]:+${group1[@]}}") ;; 1) options=("${group1[@]:+${group1[@]}}") ;;
2) options=("${group2[@]:+${group2[@]}}") ;; 2) options=("${group2[@]:+${group2[@]}}") ;;
3) options=("${group3[@]:+${group3[@]}}") ;;
esac esac
if [ ${#options[@]} -eq 0 ] && [ "${group}" -gt 1 ]; then if [ ${#options[@]} -eq 0 ] && [ "${group}" -gt 1 ]; then