Commit Graph

91 Commits (29ca9d2d4df9f93d7097ee18e1fe32487b860342)

Author SHA1 Message Date
Abhijeet Kasurde b6753b46a9
Replace 'message' in module parameters (#60051)
* 'message' parameter is replaced by 'commit_message' in grafana_dashboard
* 'message' parameter is replaced by 'notification_message' in datadog_monitor

This change is required since 'message' as parameter name is used internally by
Ansible core engine.

Fixes: #39295 #45362 #47132 #59617

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Felix Fontein f6815040fd
add_file_common_arguments: fix defaults and tpyes, improve sanity checking (#67243)
* Make validate-modules stop ignore FILE_COMMON_ARGUMENTS.

* Add types to FILE_COMMON_ARGUMENTS and update document fragment to match it.

* Update ignore.txt.

* Add changelog.
4 years ago
Sam Doran 8f296a6533
ansible-test - add constraint for virtualenv (#67289)
* ansible-test - add constraint for virtualenv

* Limit virtualenv only on macOS.

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Matt Clay 1110e9d80d Test AIX with smaller volumes. 4 years ago
Mark Chappell 5d4d9d40af
ansible-test - Add 'get' to the list of bad choices for state (#66921)
* ansible-test - Add 'get' to the list of bad choices for state

* Changelog fragment
4 years ago
Jordan Borean 811c54a7a4
validate-modules - support deprecated_aliases (#66965)
* validate-modules - support deprecated_aliases

* Removed changelog fragment
4 years ago
Yanis Guenane 4fd2dce7f3
Testing: Add support for AIX platform (#65802) 4 years ago
Sviatoslav Sydorenko eec6afd116 Explicitly set junit_family=xunit1 @ pytest config
This change hides the deprecation warning and protects from
failures in pytest==6.0.0

Ref:
* https://github.com/ansible/ansible/pull/66445#discussion_r372530176

Co-Authored-By: Matt Clay <matt@mystile.com>
4 years ago
Mark Chappell 1156962cde
Forbid `state=(list|info)` in modules via ansible-test sanity check
PR #66898

This change introduces a new sanity check with code
`parameter-state-invalid-choice` in the `ansible-test sanity`
validator. It enforces modules not to support `list` or `info`
as their `state`.

Co-Authored-By: Sviatoslav Sydorenko <webknjaz@redhat.com>
Co-Authored-By: Felix Fontein <felix@fontein.de>
4 years ago
Matt Clay 21069c84d9 Fix ansible-test color `ls` logic. 4 years ago
Matt Clay 428aaf7e65 Keep SSH authorized keys in ansible-test setup. 4 years ago
Mark Chappell 35652ca788 Add tests to make sure that the documented 'elements' matches that defined in argument_spec (#66385)
* Add tests to make sure that the documented 'elements' matches that defined in argument_spec

* Mass-add test/sanity/ignore.txt
4 years ago
Mark Chappell 5ff899662d Add sanity test to require elements entry when argument type=list (#66386)
* Require elements entry for lists

* Bulk add initial test/sanity/ignore.txt
4 years ago
Matt Clay 965854fbd2
Add constraints for Jinja2 on Python 2.6. (#66826)
* Add constraint for Jinja2 on Python 2.6.

* Fix constraint in inventory_aws_conformance test.

* Add constrraints for template_jinja2_latest test.
4 years ago
Felix Fontein 8cff585891
Schema validation for argument_spec (#65747)
* Start of schema for argument_spec

* Add changelog.

* Remove superfluous import.

* Update ignore.txt

Co-authored-by: Matt Martz <matt@sivel.net>
4 years ago
Felix Fontein c58d8ed1f5 Improve deprecate sanity check; remove deprecated features which should have been removed for 2.9 (#65745)
* Update deprecation check.

* Remove support for check_invalid_arguments.
5 years ago
haiyuan_zhang bc37ea96d5 Vmss scale in policy (#66512)
* azure_rm_virtualmachinescaleset: add scale_in_policy and terminate_event_notification

* azure_rm_virtualmachinescalesetinstance: add vmss instance protection policy support
5 years ago
Matt Clay 3db1ac4f56 Ignore warnings in ansible-test environment check. 5 years ago
Matt Clay 51e5b714e0
Add test constraint for setuptools. (#66426)
* Add test constraint for setuptools.

* Update pip test to work on centos6 container.
5 years ago
Sam Doran 92677d43b6 Account for argument spec of None in validate modules sanity test 5 years ago
Matt Clay 9ea5b539b6 Add ansible-test constraint to avoid coverage 5.0+ 5 years ago
Toshio Kuratomi ece306b201 Add a sanity test for yaml to make sure we can parse all yaml
Check that all yaml we ship is parsable by the pyyaml c backend.  Since
Ansible uses Pyyaml for docs and playbooks, if the yaml files aren't
parsable, they will error out if they were used.

Warn and skip yamllint if libyaml backend is not present

Ignore new errors in examples until someone can fix them
5 years ago
Felix Fontein a0f26b40cb Sanity checks: test for print statement (#65219)
* Add test for print() call in module_utils and modules.

* Add changelog fragment.

* Add ignore.txt entries.

* Use blacklist plugin instead of adding a new.

* Update ignore.txt
5 years ago
Matt Clay fb69d68821
Fix plugin paths for ansible-test pylint test. (#65526)
* Fix plugin paths for ansible-test pylint test.
5 years ago
Sam Doran 2a7623dd5c
Add CentOS 8 to the test matrix (#63649) 5 years ago
Felix Fontein 4be8b2134f Sanity checks: make sure that `required` in argument spec coincides with documentation (#65437)
* Add sanity test for required parameters, update ignore.txt, and add changelog.
5 years ago
Sam Doran 0e5a83a1cc
Add Fedora 31 to the test matrix (#64848)
* Add Fedora 31 to the test matrix

* Remove Fedora 29 from the test matrix
5 years ago
Felix Fontein 784e507671 module sanity checks: improve alias handling (#59060)
* add_file_common_args is only of interest on top-level.
* Handle undocumented arguments in one place.
* Update ignore.txt
* Add changelog
5 years ago
Matt Clay 4f51b7d323 Remove ansible-test --tox delegation option.
Use the --venv option instead.

This option was only available when running from source to test the ansible/ansible repository.

This will have no effect on testing collections or running from an installed version of Ansible.

Also update docs to reference the --venv option instead of the --tox option.
5 years ago
Matt Martz b93d92ef9a
Set alter_sys=True instead of False to address backwards incompat (#64670)
* Set alter_sys=True instead of False to address backwards incompat

* ci_complete

* Add integration test

* ci_complete

* sanity

* ci_complete

* Changelog fragment

* Update import test and validate-modules to match
5 years ago
Matt Clay 75646037dc Switch from RHEL 8.0 & 8.1b to 8.1 in CI. 5 years ago
Matt Clay adcf9458f1
Fix ansible-test collections sanity import test. (#64467)
* Fix ansible-test collections sanity import test.

Resolves https://github.com/ansible/ansible/issues/64466

* Fix get_source implementation also.

* Fix is_package function.
5 years ago
Matt Clay e9f8a34dce
Fixes for validate-modules import handling. (#63932)
* Fix validate-modules support for collections.

- Relative imports now work correctly.
- The collection loader is now used.
- Modules are invoked as `__main__`.

* Remove obsolete validate-modules code ignores.

* Handle sys.exit in validate-modules.

* Add check for AnsibleModule initialization.

* Remove `missing-module-utils-import` check.

This check does not support relative imports or collections.

Instead of trying to overhaul the test, we can rely on the `ansible-module-not-initialized` test instead.

* Fix badly named error codes with `c#` in the name.

The `#` conflicts with comments in the sanity test ignore files.

* Add changelog entries.
5 years ago
Matt Clay 92ccdeac31 Fix various import sanity test issues.
- Relative imports are now properly recognized.
- Correct script invocation of Ansible modules is used.
- Warnings are now consistently reported as errors.
- Errors are now consistently reported with the file tested.

Resolves https://github.com/ansible/ansible/issues/62723
Resolves https://github.com/ansible/ansible/issues/61884
5 years ago
Felix Fontein 04252cf90d Improve validation of module return values (#63411)
* Add contains: validation for return values.

* Only require returned: on top level.

* Fix various return value problems.

* Update ignore.txt.

* Two more.
5 years ago
Matt Clay 92b387aa27 Fix hcloud requirements.
Avoid installing hcloud on Python 3.9 since it is not supported.
5 years ago
Matt Clay 437e9b7063 Fix ansible-test sanity requirements install.
This fixes ansible-test so it no longer tries to install sanity test dependencies on unsupported Python versions.
5 years ago
Matt Clay 7448084858 Update default-test-container to 1.10.1.
This brings in the final Python 3.8.0 release instead of a release candidate.
5 years ago
Matt Clay 32b57d57a0 Add constraint for pathspec.
This fixes installation of pathspec on Python 2.6.
5 years ago
Felix Fontein 054285c34c crypto modules: improve return value list documentation (#62929)
* Improve return value documentation by allowing entry for return values.
* Add docs formatting, adjust styling.
* Fix sample return value. (Taken from https://tools.ietf.org/html/rfc7517#appendix-A.1.)
* Work around abuse of .
5 years ago
Matt Martz 03b98f6351 Fix plain format output functionality (#63107) 5 years ago
Matt Clay 811127d64d Add RHEL 8.1b to the Shippable test matrix. 5 years ago
Pedro Magalhães 67d9cc45bd maven_artifact.py - add support for version ranges by using spec (#54309) (#61813) 5 years ago
Matt Clay 022335669c
Work around ssh-keygen issue in ansible-test. (#63211)
Newer versions of ssh-keygen create PEM keys that are not recognized by Paramiko.

Now ansible-test compensates for this by updating they keys it generates so Paramiko will recognize them.
5 years ago
Gonéri Le Bouder 2f5886f4ef vmware/test: add vsphere-automation-sdk dep
The following modules depend on `vSphere Automation SDK`:

- `vmware_rest_client`
- `vmware_guest_info`
- `vmware_tag_manager`
- `vmware_vm_inventory`

The associated test cannot be run with `govcsim`. But the situation is
changing since we will soon run them on a regular lab, and so, we
need to install the dependency.

Bumping the default-test-container version to 1.9.3 to get a fresh version
of pip and requests.

Depends-On: https://github.com/ansible/ansible/pull/62412
5 years ago
Lukas Kämmerling fd7e156ccd Add hcloud_floating_ip module (#62409) 5 years ago
Gonéri Le Bouder b68f5b406a test: bump default-test-container
VMware VSphere SDK needs an up to date version of `pip` for the
installation step. With the current image, we face the following error:

```
(...)
02:27 Collecting git+https://github.com/vmware/vsphere-automation-sdk-python.git (from -r /root/ansible/test/lib/ansible_test/_data/requirements/integration.cloud.vcenter.txt (line 2))
02:27   Cloning https://github.com/vmware/vsphere-automation-sdk-python.git to /tmp/pip-req-build-pm27t16b
02:33 Requirement already satisfied: pyvmomi in /usr/local/lib/python3.6/dist-packages (from -r /root/ansible/test/lib/ansible_test/_data/requirements/integration.cloud.vcenter.txt (line 1)) (6.7.1.2018.12)
02:33 Requirement already satisfied: lxml>=4.3.0 in /usr/local/lib/python3.6/dist-packages (from vSphere-Automation-SDK==1.4.0->-r /root/ansible/test/lib/ansible_test/_data/requirements/integration.cloud.vcenter.txt (line 2)) (4.4.0)
02:33 Processing ./\\localhost/tmp/pip-req-build-pm27t16b/lib/vapi-runtime/vapi_runtime-2.12.0-py2.py3-none-any.whl
02:33 Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/root/ansible/\\\\localhost/tmp/pip-req-build-pm27t16b/lib/vapi-runtime/vapi_runtime-2.12.0-py2.py3-none-any.whl'
```

Bump default-test-container to 1.9.3 to get an up to date release of
`pip` (was 19.0.2, is now 19.2.3).
5 years ago
flowerysong d933278f3d Add version 2.14 to the removed_in list (#62298)
devel is now 2.10, so this needs to be bumped as well.
5 years ago
Sam Doran 08279c7d54
Update default test container with Python 3.8b4 (#62100) 5 years ago
Evgeni Golov 48a39f5616 typo: missing-subption-docs → missing-suboption-docs (#62180)
updates the name of the test and all ignore.txt entries
5 years ago