Add 'netaddr' To 'requirements.txt' For Unit Tests (#143)

Add 'netaddr' To 'requirements.txt' For Unit Tests

This enables 'ansible-test --docker' and 'ansible-test --venv' to be able to leverage 'netaddr' and pass tests

SUMMARY

This adds the 'netaddr' python module to the requirements specific to unit tests. This allows 'ansible-test' to work for '--docker' and '--venv' without manual intervention.
I also re-ordered the current list to be alphabetical.

Fixes #142
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

Unit tests in ansible.utils for ipsubnet
ADDITIONAL INFORMATION



git clone https://github.com/ansible-collections/ansible.utils.git
cd ansible.utils
ansible-galaxy collection build .
ansible-galaxy collection install -p . ansible-utils-\*.tar.gz
ansible-test units --docker base tests/unit/plugins/filter/test_ipsubnet.py --requirements --verbose

Reviewed-by: Ashwini Mhatre <mashu97@gmail.com>
pull/147/head
Tim Way 2022-02-25 01:32:23 -06:00 committed by GitHub
parent 8031770a87
commit a14a9337c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,7 @@
---
trivial:
- >-
unit-testing - adds the python netaddr module as a requirement that
ansible-test will install when operating in container (--docker) or python
virtual environment (--venv) mode.
(https://github.com/ansible-collections/ansible.utils/issues/142)

View File

@ -1,4 +1,5 @@
unittest2 ; python_version < '2.7'
jsonschema ; python_version >= '2.7'
ttp
netaddr
textfsm
ttp
unittest2 ; python_version < '2.7'