1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/sanity/code-smell/test-constraints.sh
Matt Clay 36b13e3e3d Fix ansible-test default image. (#31966)
* Add openssh-client to default docker container.
* Include Azure requirements in default container.

To do so, handling of pip requirements was updated to install each
set of requirements separately and then run a verification pass to
make sure there are no conflicts between requirements.

* Add missing --docker-no-pull option.
* Add documentation for the azure-requirements test.
2017-10-20 08:48:01 -07:00

17 lines
521 B
Bash
Executable file

#!/bin/sh
constraints=$(
grep '.' test/runner/requirements/*.txt \
| grep -v '(sanity_ok)$' \
| sed 's/ *;.*$//; s/ #.*$//' \
| grep -v '/constraints.txt:' \
| grep -v '/integration.cloud.azure.txt:' \
| grep '[<>=]'
)
if [ "${constraints}" ]; then
echo 'Constraints for test requirements should be in "test/runner/requirements/constraints.txt".'
echo 'The following constraints were found outside the "constraints.txt" file:'
echo "${constraints}"
exit 1
fi