Commit Graph

308 Commits (2d98b94f6c39edcaa9550b5840d9218fbf45c34e)

Author SHA1 Message Date
Matt Clay 586e40facf ansible-test - Update default containers to 4.2.0. 4 years ago
Matt Clay 7df9c1bc91
[stable-2.12] ansible-test - Managed venv fixes. (#77100)
* ansible-test - Remove cap on cryptography version.

(cherry picked from commit 00a2b7788e)

* ansible-test - Fix consistency of managed venvs. (#77028)

(cherry picked from commit 68fb3bf90e)

* Avoid system-site-packages in AZP coverage venvs.

The use of `--venv-system-site-packages` was an optimization to use the `coverage` package pre-installed in the AZP test container.
However, now that the venv is bootstrapped by ansible-test that optimization no longer makes sense, since other downloads are already taking place.

(cherry picked from commit 177336a9d3)

* ansible-test - Clean up venv code.

(cherry picked from commit addb9baec2)

* Adjust virtualenv version for Python 2.6.

* Adjust bootstrap URL to work with Python 2.6.

* Enable PyPI proxy for generic tests.

This is needed to support ansible-test integration tests on Python 2.6.

* Freeze plugin import sanity test requirements.

Based on https://github.com/ansible/ansible/pull/76308
4 years ago
Matt Clay aa3747d116
[stable-2.12] ansible-test - Update alpine3 container to 3.3.0. (#76978)
This updates the base image from 3.14.2 to 3.15.0, which includes support for installing binary wheels using pip..
(cherry picked from commit e27b94c467)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Matt Clay 295a22f0b6 [stable-2.12] ansible-test - Use `--forked` instead of `--boxed`
The `--boxed` option is deprecated.
(cherry picked from commit eaeec8a65c)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Matt Clay f3de38a975 ansible-test - Update default test containers.
The updated containers include the recently updated `import` sanity test requirements.
4 years ago
Matt Clay 6cba4c11d4
[stable-2.12] ansible-test - Multiple related backports. (#76136)
* [stable-2.12] ansible-test - Fix Python real prefix detection.

(cherry picked from commit b4cbe1adcf)

* ansible-test - Remove duplicate code.

(cherry picked from commit b9694ce4fb)

* Overhaul ansible-test integration tests. (#76111)

* Overhaul ansible-test integration tests.
* ansible-test - Fix import test pyyaml usage.
* ansible-test - Remove unused import.
* ansible-test - Fix traceback when pip is unavailable.
* ansible-test - Fix typo in port forwarding message.
* ansible-test - Fix controller logic in requirements install.
* Fix unit tests in ansible-test integration test.

Unit tests are now run for available Python versions which
provide `virtualenv` (Python 2.x) or `venv` (Python 3.x).

(cherry picked from commit cae7d2a671)

* ansible-test - Fix import test on old Pythons. (#76137)

(cherry picked from commit cd64e0b070)

* Skip ansible-test tests on Python 2.6.
4 years ago
Matt Clay 72c1eec1ea [stable-2.12] ansible-test - Update base and default containers.
The containers now include Python 3.10.0 instead of Python 3.10.0rc2..
(cherry picked from commit 2f531d73dd)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Matt Clay 0270c2306d ansible-test - Update distro test containers.
(cherry picked from commit f4d4391a1f)
4 years ago
Matt Clay e66e2e25c8 ansible-test - Update default containers. 4 years ago
Matt Clay b51e62f6e5 ansible-test - Add minimum constraints for pytest.
Use `--strict` for `pytest` on Python 2.6 since `--strict-markers` is not available.
4 years ago
Matt Clay 28a094c5de ansible-test - Remove unused constraints.
ci_complete
4 years ago
Matt Clay 46c7b24188
ansible-test - Update distro test containers. (#75762) 4 years ago
Matt Clay 7a76130502 ansible-test - Update default containers.
ci_complete
4 years ago
Matt Clay 4652d6ee43 ansible-test - Remove deprecated environments. 4 years ago
Matt Clay 178a67fd40
ansible-test - Add support for windows/2022 (#75743)
ci_complete
4 years ago
Matt Clay 4ea8d9a782
ansible-test - split controller/target testing (#75605) 4 years ago
Matt Clay 99a79e1969
ansible-test - Move code from _data to _util. (#75495)
* Update paths to match relocated files.
* Update ansible-test symlink paths.
* Update path classification.
* Update MANIFEST.in
* Update sanity test context paths.
* Update sanity ignores.
* Update shebang sanity test.
* Update configure-remoting-ps1 sanity test.
* Update BOTMETA.yml to reflect new paths.
* Update paths in collection loader comments.
* Update Makefile for ansible-test.
* Update docs.
* Add changelog fragment.
4 years ago
Matt Clay 2b463ef197
ansible-test - Upgrade pylint to 2.9.3. (#75480)
* ansible-test - Upgrade `pylint` to 2.9.3.
* Update pylint ignores due to rule name change.
* Disable pylint deprecated-class for compat code.
* Add pylint ignores for test support content.
* Add ignores for arguments-renamed in lib/ansible/
* Add pylint ignores for collection_loader.
* ansible-test - Ignore deprecations in legacy collection loader.
* ansible-test - Suppress pylint consider-using-with
* ansible-test - Suppress pylint false positive.
* ansible-test - Suppress pylint consider-using-with.
* ansible-test - Suppress pylint deprecated-module
* Disable some of the new pylint suggestions.
* Remove unnecessary six usage from string_format pylint plugin.
* Remove obsolete ignore entry.
4 years ago
Matt Clay ca2d2c5f38
ansible-test - Cleanup to prepare for pylint update. (#75469)
* ansible-test - Fix use of abstractproperty
* ansible-test - Use dict.items() where possible.
* ansible-test - Remove unused code.
* ansible-test - Cleanup issues reported by pylint.
* ansible-test - Use dict.items() where possible.
* ansible-test - Use generator.
4 years ago
Sloane Hertel cea4886c7c
Update test container versions (#75447)
* Update test container versions to use the most recent which contain Python 3.10.0 RC1
4 years ago
Felix Fontein fae299708f
plugin attributes: make validate-modules strict again, improve version_added support (#74602)
* Add basic schema for attributes.

* Support attributes for version_added_collection adding mechanism.

* Add changelog fragment.

* Support new attribute properties from #74331.

* Require additional properties strictly.
4 years ago
Felix Fontein b8ebf32d85
Add sanity tests which ensures that _info and _facts modules set supports_check_mode=True. (#75324) 4 years ago
Matt Martz 2455d82c14
Make sure self doesn't end up in fake.args (#75403) 4 years ago
Sloane Hertel 83039a38ad
ansible-test - add RHEL 8.4 as a remote (#75362) 4 years ago
Sloane Hertel f6b27f6e35
Update test container versions (#75359)
* Update test container versions for default-test-container and ansible-core-test-container
4 years ago
Felix Fontein 7726b70d9a
Improve handling of AnsibleModule arguments in validate-modules (#75332)
* Make sure AnsibleModule positional arguments are validated.

* Extract ANSIBLE_MODULE_CONSTURCTOR_ARGS with inspection.

* Remove no longer necessary return value.

* Fix PR #.

* argument_spec might not have been specified, as in community.general.xenserver_facts.

* Fix typo.
4 years ago
Sergey 40ca87a963
Add packaging to requirement of ansible-test (#75356)
* Add packaging to requirement of ansible-test

Fix #75353

After requires_ansible field was added as mandatory to runtime.yml
file, ansible-test fails to check this field if it doesn't have
packaging module.

[1] https://github.com/ansible/galaxy-importer/pull/124
4 years ago
Sloane Hertel 3b861abce1
add action_groups support to collections (#74039)
* Canonicalize module_defaults actions and action_groups pre-fork and cache them on the play

* Call get_action_args_with_defaults with the resolved FQCN plugin and don't pass the redirect list

* Add validation for action_group metadata and a toggle to disable the warnings

* Handle groups recursively referring to each other

* Remove special-casing for non-fqcn actions in module_defaults groups

* Error for actions and groups in module_defaults that can't be resolved

* Error for fully templated module_defaults

* Add integration tests for action_groups

* Changelog
4 years ago
Felix Fontein 67bc49e001
Restrict packaging to < 21.0 for Python < 3.6. (#75186) 4 years ago
Abhijeet Kasurde 870f943365
docs: Update Python 2 doc links (#74633)
* docs: Update Python 2 doc links

Update links from Python 2 to Python 3

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* use docs.python.com/3/ everywhere, except onethat should remain 2.6

* refer to python 3 in module docs and comments

* format two python docs links as list

* updates links in unwanted.py test file

* per matt clay, this should link to python 2

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
5 years ago
Sam Doran c0cb353ce1
Remove PyCrypto (#74699)
* Remove PyCrypto from setup.py and packaging script
* Remove mention of pycrpto from installation docs
* Remove PyCrypto from vault
* Remove pycryto constraint and unit test requirement
* Remove PyCrypto tests from unit tests
* Add docs and fix warning message
* Remove section about cryptography library in Ansible Vault docs
5 years ago
Jordan Borean e875e91363
ansible-test - use pwsh to generate stubs (#74271) 5 years ago
Matt Martz d6e28e6859
Update vendored copy of `six` to 1.16.0 (#74680)
* Update to six 1.16.0

* Address linting issues

* Remove six find_spex/exec_module warning filters

* Remove unnecessary comment about Py2.6, 2.13 will not support Py2.6, and we're bumping this for 2.12

* ci_complete

* Add changelog fragment
5 years ago
Sam Doran f99d024851
CI and compat fixes for Jinja2 >= 3.0 (#74666)
* Add constraint for MarkupSafe

MarkupSafe >= 2.0.0 requires Python >= 3.6.0. Add a constraint for older Python versions
and fix the `groupby_filter` test.

* Fix template_jinja2_latest test.

* patch filter decorators on newer Jinja2

* Jinja2 >= 3.0 renames several filter decorators used by Ansible itself, as well as by filters in collections. This patch ensures that the old names are usable within Ansible and by collections without warnings or errors.

* Ignore docs-build issues.

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Davis <mrd@redhat.com>
5 years ago
Matt Martz 8d1cf7f266
Vendor `distutils.version` (#74644)
* Vendor distutils.version

* Fix import order. ci_complete

* remove distutils warning filter

* Don't remove warnings filter from importer

* ci_complete

* Add pylint config for preventing distutils.version

* Add changelog fragment
5 years ago
Matt Clay 7b0c4845d9 Remove PyYAML warning filter in import test.
The filter is obsolete now that PyYAML imports go through our compat layer.
5 years ago
Matt Clay 51fd05e76b Add support for testing with Python 3.10. 5 years ago
Matt Clay 2e97240c67 Ignore more Python 3.10 warnings in import test. 5 years ago
Jordan Borean a277644301
Add python 3.10 constraint for pyspnego (#74612) 5 years ago
Matt Clay 5487e9e4fd Update runtime-metadata sanity test for Python 3.10. 5 years ago
Matt Clay cbac26e500 Update import sanity test for Python 3.10. 5 years ago
Matt Clay 2c3a3bdd9c Update pylint sanity test to work on Python 3.10. 5 years ago
Matt Clay c2e15f45a6 Update ansible-test compile sanity test.
The test has been rewritten to improve error handling and add support for Python 3.10.
5 years ago
Matt Clay 5dfc7ee078 Remove Shippable CI provider from ansible-test. 5 years ago
Rick Elrod d8c20a73a4
[ansible-test] Add Fedora 34, update Fedora 33 (#74506)
Change:
- Added Fedora 34 container image to docker.txt
- Dropped Fedora 32 from CI
- Added Fedora 34 to CI
- Updated Fedora 32 and 33 containers for ssh-related fixes
- Move cron fix from 698eae3f3d into
  cron_setup and make it more generic; it can affect modern distros too.

Test Plan:
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Matt Clay a30c55f68a Remove deprecated `common.removed` module_util.
Tests have been updated to reflect its removal as well.
5 years ago
Matt Clay baa371e7b5 Add comments to keep collection loader in sync. 5 years ago
Matt Clay c4e76a7f80 Add collection config support to ansible-test. 5 years ago
Matt Clay 8223dfccbe ansible-test - Improve __main__ checks. 5 years ago
Matt Clay ecc5a53288
Update default containers to 3.4.0. (#74415)
* Update default containers to 3.4.0.

The 3.4.0 containers use Python 3.6 (the system Python) for `/usr/bin/python3`.

Python 3.9 continues to be the default Python version selected by `ansible-test` for these containers.

* Fix shebang on build-ansible.py.

Using `python` instead of `python3` allows `ansible-test` python interception and requirements install to function.
5 years ago