Matt Clay
5e68bb3d93
Add code coverage target analysis to ansible-test. ( #67141 )
...
* Refactor coverage file enumeration.
* Relocate sanitize_filename function.
* Support sets when writing JSON files.
* Generalize setting of info_stderr mode.
* Split out coverage path checking.
* Split out collection regex logic.
* Improve sanitize_filename type hints and docs.
* Clean up coverage erase command.
* Fix docs and type hints for initialize_coverage.
* Update type hints on CoverageConfig.
* Split out logic for finding modules.
* Split out arc enumeration.
* Split out powershell coverage enumeration.
* Raise verbosity level of empty coverage warnings.
* Add code coverage target analysis to ansible-test.
5 years ago
Matt Martz
0e46af17a5
Nuke all removed_module stubs ( #67139 )
...
* Nuke all removed_module stubs
* Remove ignores and botmeta entry
5 years ago
Ruediger Pluem
80c4b86abe
group - correctly determine if a local group exists. ( #59772 )
...
Fixes #58619
Add integration test
5 years ago
Markus Bergholz
822077fefd
Asg mixed instance types ( #67045 )
...
* merge from origin pr 55067
* handle update existing asg with mixed-instance-policy
* fix documentation and append output
* update output documentation
* update documentation version added
* add integration test for mixed instance policy using launch template
* add changelog fragment
* Update lib/ansible/modules/cloud/amazon/ec2_asg.py
Co-Authored-By: Mark Chappell <mchappel@redhat.com>
* Update lib/ansible/modules/cloud/amazon/ec2_asg.py
Co-Authored-By: Mark Chappell <mchappel@redhat.com>
* Update lib/ansible/modules/cloud/amazon/ec2_asg.py
Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>
* add warning about botocore version and add expand example documentation
* Update changelogs/fragments/67045-ec2_asg_mixed_instance_policy.yml
Co-Authored-By: Mark Chappell <mchappel@redhat.com>
* Update lib/ansible/modules/cloud/amazon/ec2_asg.py
Co-Authored-By: Mark Chappell <mchappel@redhat.com>
* Update lib/ansible/modules/cloud/amazon/ec2_asg.py
Co-Authored-By: Mark Chappell <mchappel@redhat.com>
* remove useless line
Co-authored-by: Yi-Tse Hong <yitse.hong@soocii.me>
Co-authored-by: Mark Chappell <mchappel@redhat.com>
Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
5 years ago
Jordan Borean
78470c43c2
Removed deprecated items in Windows modules ( #67105 )
5 years ago
GomathiselviS
4ac89b8ac7
Added Fix - Allow nxos_l2_interfaces to append the allowed vlans list ( #66517 )
...
* Added Integration tests
* Corrected lint errors
* Added fix for bug # 54400
* Revert "Added fix for bug # 54400"
This reverts commit bf42db4269
.
* Revert "Adding files for RM static_routes"
This reverts commit dafdd92d43
.
* Revert "Added Integration tests"
This reverts commit 129dc87682
.
* Bug Fix 65332
* Added testcase for #66517
* Removed unnecessary commit
* fixing conflicts
* fixing conflicts
* addressed mikeweibe's comments
* Corrected lint errors
* Added idempotent tc for add vlans
* Added replaced and overridded tcs for trunk vlan add
5 years ago
Matt Clay
f4a80bb600
Code cleanup and refactoring in ansible-test. ( #67063 )
...
* Code cleanup in ansible-test.
* Split out encoding functions.
* Consoldate loading of JSON files.
* Split out disk IO functions.
* Simplify file access.
* Add functions for opening files.
* Replace open calls with appropriate functions.
* Expose more types from typing module.
* Support writing compact JSON.
* Add verbosity argument to display.warning.
* Add changelog entry.
* Update files overlooked during rebase.
* Use `io.open` instead of `open`.
* Fix file opening for imp.load_module.
* Remove use of `r+` mode to access files.
* Add missing import.
* Fix httptester on Python 2.x.
* Clarify changelog fragment.
* Consolidate imports. Remove extra newlines.
* Fix indirect imports.
5 years ago
Erwin Oegema
3b32f95fb3
user - warn if "append" is set but not "groups" ( #65795 )
...
This fixes people unknowingly changing the primary group rather than adding a secondary group.
* Add integration test
5 years ago
Felix Fontein
fe454d27a1
Fix removed_in_version to support honor suboptions ( #66918 )
...
* Add unit tests.
* Fix reporting for removed_in_version.
* Add changelog.
5 years ago
Brian Scholer
fc7980af9a
Fix UNC path support in the powershell shell plugin ( #66604 )
...
* Fix UNC path joining in the powershell shell plugin, add test
* Remove testy bits and a redundant line
* Fix style nits
* Update to use os.ntpath
* Add changelog for #66604
5 years ago
Jordan Borean
3ada0b2f65
win_uri: fix up tests ( #67064 )
5 years ago
Felix Fontein
23b2bb4f4d
docker_container: change behavior for one-port container ranges to be same as docker CLI ( #66382 )
...
* Adjust docker_container behavior for one-port container ranges to be similar to docker CLI.
* Add changelog.
* Add documented examples for ports:.
5 years ago
Andrew Klychkov
21ae66db2e
postgresql_user_obj_stat_info: new module ( #66892 )
...
* postgresql_user_obj_stat_info: new module
* fix sanity
* add schema parameter
* add CI tests
* add RETURN section
* add example with schema
* fix CI
* fix example comments
* skip aix
* fixes part 1
* fixes part 2
* fix CI
* fix CI
* fix doc formatting
5 years ago
Nathaniel Case
53c7f8cbde
Allow httpapi for EOS resource modules ( #66871 )
...
* Redo tests to be transport agnostic
cli -> eos config
* Redirect connection for httpapi
* Fix tests
* Handle missing platform imports
5 years ago
Felix Fontein
8f10db8552
Do fail instead of regenerate for password protected and invalid keys. ( #65638 )
5 years ago
Felix Fontein
d6fb9da8ed
openssl_* modules: allow direct input and output for some files ( #65400 )
...
* Allow to return generated object.
* Use slurp module instead of file lookup + b64encode.
* Rename return_xxx_content -> return_content.
5 years ago
Andrew Klychkov
3baea92ec9
Bugfix of 54239: mysql_variables not supporting variables name with dot ( #66806 )
...
* Bugfix of 54239: mysql_variables not supporting variables name with dot
* add changelog
* add CI tests
5 years ago
Toshio Kuratomi
f5e194cbcd
Move random_mac into its own file ( #67000 )
...
* Move random_mac into its own file
This is likely to be the only filter which is not included in
ansible-base. So it needs to be in its own file.
5 years ago
Nathaniel Case
3dbc03d58a
Try to load action plugin from the same collection as the module ( #66701 )
...
* Try to load network action plugin from the same collection as the module
* Alter tests to match
Just make sure the action plugin is as qualified as the module it is paired with
5 years ago
Andrew Klychkov
54520c4685
mysql_user: priv parameter can also be a dictionary ( #66801 )
...
* mysql_user: add priv_dict parameter
* add changelog
* priv can be string or dictionary
* fix example
5 years ago
Mark Chappell
813091cf94
Migrate ec2_vol_info to AnsibleAWSModule ( #66979 )
...
* Migrate ec2_vol_info to AnsibleAWSModule
* Enable ec2_vol_info tests
* Add changelog
* Update lib/ansible/modules/cloud/amazon/ec2_vol_info.py
Co-Authored-By: Sloane Hertel <shertel@redhat.com>
5 years ago
Felix Fontein
f1a30164c5
Fix 'container_default_behavior: no_defaults'. ( #66601 )
5 years ago
Jordan Borean
2a9ec8975f
win_unzip - LiteralPath fix ( #66972 )
...
* win_unzip - LiteralPath fix
* Fix up Python sanity issues
5 years ago
Matt Clay
d584584474
Reorganize ansible-test coverage code.
...
This change moves all code for the `ansible-test coverage` command into the `coverage` directory.
Each subcommand is split into a separate file.
Only minor spelling changes were made aside from code relocation.
5 years ago
Gonéri Le Bouder
2ea159eefd
vmware_cluster_facts does not set hosts key
...
Since https://github.com/ansible/ansible/pull/61006 `vmware_cluster_info`
exposes a new key called `hosts`. The deprecated module
`vmware_cluster_facts` keeps the previous behaviour, and so we must keep
its test-suite unchanged.
5 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
5 years ago
Jordan Borean
811c54a7a4
validate-modules - support deprecated_aliases ( #66965 )
...
* validate-modules - support deprecated_aliases
* Removed changelog fragment
5 years ago
Matt Clay
4452f506a8
Split up filter integration tests. ( #66962 )
...
* Split out json_query filter tests.
* Split out urlsplit filter tests.
* Split out ipaddr filter tests.
* Split out urls filter tests.
* Split out mathstuff filter tests.
* Clean up core filter tests.
5 years ago
Sam Doran
5112feeace
Make get_bin_path() always raise an exception ( #56813 )
...
This makes it behave in a more idiomatic way
* Fix bug in Darwin facts for free memory
If the vm_stat command is not found, fact gathering would fail with an unhelpful
error message. Handle this gracefully and return a default value for free memory.
* Add unit tests
5 years ago
Felix Fontein
5fdc9a61f0
docker_container: pass volumes only for anonymous volumes ( #66600 )
...
* Simplify code.
* Only pass anonymous volumes.
* Add changelog and update porting guide.
* Add integration tests.
5 years ago
Matt Clay
49d8d5ae33
Fix ansible-test tar format handling.
5 years ago
Yanis Guenane
4fd2dce7f3
Testing: Add support for AIX platform ( #65802 )
5 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>
5 years ago
Matt Clay
479845a05c
Expand Shippable test matrix. ( #66912 )
...
* Add 2 CI groups for AWS.
* Add 1 CI group for vmware.
* Add 1 CI group for CS.
* Add 1 CI group for posix.
5 years ago
Rick Elrod
e2a57414f4
Remove `with` statement for pytest-mock unit tests
...
As per:
https://github.com/pytest-dev/pytest-mock#note-about-usage-as-context-manager
pytest-mock is not meant to be used within a `with` context or as a
decorator. Instead, pytest-mock will automatically unpatch the mocked
methods when each test is complete.
In newer pytest-mock, this use actually throws an exception and causes
the tests to fail.
This hasn't been hit in Ansible's CI yet, because the docker image
that the tests run in uses an older version of pytest-mock. However,
there is no constraint on the upper bound of pytest-mock in
test/lib/ansible_test/_data/requirements/constraints.txt which means
that when running the tests locally, outside of that docker image, the
tests never pass.
This patch removes the `with` context in each such case.
Signed-off-by: Rick Elrod <rick@elrod.me>
5 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>
5 years ago
Gonéri Le Bouder
6e2fff1acc
vmware_vswitch/test: clean up vmswitch_0002
...
Ensure `vmswitch_0002` get removed from ESXi2 at the end of the test.
5 years ago
Matt Clay
e64b279ea1
Add CS smoketest group for CI.
5 years ago
Jiri Hnidek
6f1bb37feb
When no pool quantity is set, then do not set quantity to 1 ( #66807 )
...
* Fixes #66478
* When no quantity is set, then candlepin server usually uses
default value 1. When more quantities are required, then
candlepin server can automatically choose correct minimal
value.
5 years ago
Sam Doran
9276dd2007
file - change warning to error ( #66671 )
...
When 'src' is specified without 'state', raise an exception
5 years ago
René Moser
91063f40d6
tests: ipify_facts: retry on fail ( #66897 )
5 years ago
ngp-star
8ba324a33d
VMware: shares and io limits support while adding new disk ( #64087 )
...
Fixes : #25714
5 years ago
Andrew Klychkov
308723c3ca
postgresql_idx: revert PR for 64138 ( #66889 )
5 years ago
René Moser
4752547d35
ecs_tag: remove state=list ( #66811 )
...
* ecs_tag: remove state=list
* adjust tests
5 years ago
Matt Clay
3c3cf50e7a
Fix ansible-test coverage of ansible-connection.
5 years ago
Matt Clay
21069c84d9
Fix ansible-test color `ls` logic.
5 years ago
Matt Clay
428aaf7e65
Keep SSH authorized keys in ansible-test setup.
5 years ago
Matt Clay
efd2dd8929
Add more ansible-test args to delegation config.
5 years ago
Matt Clay
ee50792416
Add a `--no-pip-check` option to ansible-test.
5 years ago
Matt Clay
0971a0e7bc
Consolidate remote Shippable scripts.
5 years ago