Commit Graph

10207 Commits (4916be24fd8be0c223bf5e5f641d676a8d56ad82)

Author SHA1 Message Date
Matt Clay ebb255f0d3 Add Python 3.9 to ansible-test.
ci_complete
ci_coverage
4 years ago
Matt Clay e0875f2aef Skip ios_acls unit test on Python 3.5. 4 years ago
Shachaf92 2e38f80f9e
win_timezone - Allow for _dstoff timezones (#67892)
* win_timezone - Allow for _dstoff timezones

* Update win_timezone-Allow-dstoff.yml

* Added doc entry for new format

Co-authored-by: Jordan Borean <jborean93@gmail.com>
4 years ago
Matt Clay 64a2864158 Fix ansible-test constraints for AWS. 4 years ago
Matt Clay 8446553953 Fix ACI unit test on Python 3.8+ 4 years ago
Matt Clay c06f442409 Fix ansible-test import sanity test venv setup. 4 years ago
Matt Clay bcddf2bda9 Increase unit test coverage timeout. 4 years ago
Matt Clay 99e657162f Fix ansible-test module_utils analysis. 4 years ago
Matt Clay 40dc851f7e Skip mongodb tests on all centos versions.
The tests were already skipped for versions 6 and 7, and are not passing on version 8.
4 years ago
Matt Clay 0c0b3f054b Remove invalid skip aliases in tests. 4 years ago
Adharsh Srivats R 3558651d39
nxos_lldp_interfaces resource module (#67802)
* Added nxos_lldp_interfaces module

* Linting

* Added RTT, resolved shippable errors

* Added new states

* New states edit

* Updated states

* Updated tests

* Show all interfaces in facts

* Test changes

* Added unit tests

* Linting

* Handled portchannel failing condition
4 years ago
Felix Fontein 4b718ed58b
The different MongoDB test setups collide. (#67895)
ci_complete
4 years ago
Rohit 8f9f8ec594
VyOS: firewall_interfaces module added (#67254)
* firewall_interfaces module added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* delete opr updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* tests updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* ci failure fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
4 years ago
Richard Strnad 7765870421
NXOS: Manually Configurable Route-Target (#52650)
* Renamed auto evpn test

* Made sure that the current module is idempotent with additional tests

* Added tests for route-target import function

* Added tests for route-target export function

* Added tests for route-target both function

* PEP8 syntax fix

* Added route-target import & export function

* Added required 'version_added: "2.8"' in the documentation

* Updated documentation of new route-target options

* Added a test to make sure that in case of `state=absent` on the vrf
level the route-target options are ignored.

* Specified that the route-target options are ignored in case of
`state=absent'.

* Updated the doc to the correct format (using 'C()')

* Changed the VRF Route Target Syntax

Instead of using three different params (route_target_import,
route_target_export, route_target_both) the module uses now only one
param (route_targets) and the direction is specified for each of the
route targets.

Example:
route_targets:
[{rt: '...', direction: '{import|export|both}', state: '...'}]

* Updated Description and Examples to reflect new params

* Updated "version_added"

* pep8 fixes

* If rt['direction'] is not definied, we assume default 'both' and run
the same routine

* Added test with default direction for route-targets

* Documentation fixes
4 years ago
Matt Clay 70fc69c852 Fix vcenter requirements. 4 years ago
Andrew Klychkov 0bb2d67562
add new module mongodb_info (#67846)
* add new module mongodb_info

* fix doc and examples

* add GPL info

* use LooseVersion in the function doc string
4 years ago
Felix Fontein 35fd86c6bc
acme_* modules: adjust documentation to reference RFCs 8737 and 8738 instead of the drafts (#67881)
* Adjust documentation to reference RFCs 8737 and 8738 instead of the drafts.

* More references.
4 years ago
Matt Clay 7c8b046b5f
Fourth batch of incidental integration tests. (#67873)
* Copy in incidental posix tests.

* Update incidental test aliases.

* Update target names.

* Add support plugins.

* Fix paths.

* Update ignores.

* Update integration-aliases sanity test.

* Add incidental tests to CI.
4 years ago
Matt Clay 04666c9fa1
Clean up unit tests to assist with migration. (#67875)
* Split out cache plugin unit tests.

* Rename unit tests to match code under test.

* Relocate unit test code to match code under test.

* Another rename.

* Update sanity ignores.
4 years ago
Jordan Borean 26129fcb80
ansible-galaxy - optimise some paths and use fake galaxy int tests (#67685)
* ansible-galaxy - optimise some paths and use fake galaxy int tests

* Added init, built, and publish tests

* Test against both mocked Galaxy and AH server

* Finish off writing the install tests

* Fix up broken tests

* Rename test target and add migrated tests

* Use cloud provider for Galaxy implementation

* Added blank static config

* Use correct alias group

* Set release version and fix copy typo

* Remove reset step as it is no longer needed

* Use sane env var names for test container name
4 years ago
Sam Doran d30c57ab22
win_unzip - normalize and compare paths to prevent path traversal (#67799)
* Actually inspect the paths and prevent escape
* Add integration tests
* Generate zip files for use in integration test
* Adjust error message
4 years ago
Markus Bergholz 8ab304af44
implement support for hidden/protected variables gitlab_project_variable (#67461)
* #66135 implement support for hidden/protected variables

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>

* update example value

* fix pep

* fix pep8

* fix tailing whitespace

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update test/integration/targets/gitlab_project_variable/tasks/main.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* fix recommendations and request changes

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update test/integration/targets/gitlab_project_variable/tasks/main.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>

* fix undefine module

* add missing import

* expand documentation

* add idempotent check

* add changelog

* Update changelogs/fragments/67461-gitlab-project-variable-masked-protected.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* check also for integer_types

* expand integration test and check also for float type

* append documentation

* Update lib/ansible/modules/source_control/gitlab/gitlab_project_variable.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
4 years ago
Sam Doran 7a42354021
Switch to using FreeBSD 12.1 (#67659) 4 years ago
Matt Clay b84dc2f2a6 Add integration test for regex_search filter. 4 years ago
Sumit Jaiswal 9392912608
Resource module for IOS ACL (#66629)
* fix ios_acl
4 years ago
Rick Elrod ed37efb217
"Fix" test_get_bin_path by changing mock order (#67730)
pytest-mock 2.0.0, when run locally, gets grumpy when os.path.exists is
messed with and then another method is patched afterwards. Likely
something in the pytest-mock chain uses os.path.exists internally, and
since pytest-mock prohibits context-specific patching, there's not a
good solution. For now, just patch os.path.exists last.

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Sumit Jaiswal 4c0eb4396b
Resource module for IOS static routes (#64632)
* ios_static_routes
4 years ago
Sumit Jaiswal 6629b9feef
Resource module for IOS ACL_Interfaces (#66746)
* acl_interfaces
4 years ago
Felix Fontein 08fc9f63b6
Add x509_crl_info module (#67539)
* Add x509_crl_info module.

* Apply suggestions from code review

Co-Authored-By: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
4 years ago
Matt Clay 21475aa83b Test system users and groups. 4 years ago
Abhijeet Kasurde b6c2056ea2
mongodb_user: fix doc formatting (#67763)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Abhijeet Kasurde 0cd22abe8c
mongodb: Fix documentation (#67806)
* Added correct datatypes of parameter
* Fixed doc formatting

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Matt Clay 8e31a2fe40
Add lookup_dict integration test. (#67836)
* Add lookup_dict integration test.

* Skip test on python 2.6.
4 years ago
Matt Clay f735fd672a
Third batch of incidental integration tests. (#67830)
* Copy in incidental windows tests.

* Update incidental test aliases.

* Add support plugins.

* Update target references.

* Update sanity ignores.

* Update integration-aliases test.

* Add to CI.
4 years ago
Mark Chappell da30e6d2e1
sqs_queue - Move to boto3 and add support for various extra features (#66795)
* reworked sqs_queue

* Switch default purge_tags behaviour to false.

This matches the behaviour of ec2_tag and ecs_tag.

* Minor lint / review fixups

* Add missing AWS IAM policy for SQS tests

* Move integration tests to using module_defaults: group/aws:...

* add changelog

* Break out the 'compatability' map from our spec definition (gets flagged by the schema validation)

* Tweaks based on review

* add basic examples

* Lint fixups

* Switch out NonExistentQueue logic so it's easier to follow

* Reorder name argument options for consistency

Co-authored-by: Dennis Podkovyrin <dennis.podkovyrin@gmail.com>
4 years ago
Sam Doran d7546ba336
Fix PostgreSQL tests for newer FreeBSD versions (#67658)
Use PostgreSQL 9.5 on FreeBSD 12.0, and PostgreSQL 11 on FreeBSD 12.1 and 11.3 due to the Python packages having a dependency on that version of PostgreSQL and automatically uninstalling PostgreSQL 9.5.

* Use separate PostgreSQL versions for 12.0 and 12.1
4 years ago
mmoyle cfe96b2092
add module cloudformation_exports (#67349)
* add module cloudformation_exports

* add RETURN, add aliases group, clean up yaml

* update return value. uncomment security_token. remove cloudformation shortcut

* fix typo

* try to delete test stack

* rename stack

* add cleanup and assert. try to set stack name with variable

* create s3 bucket instead

* set bucket name

* add tests, remove unsed key and import, add iam role, add to module_defaults

* import exceptions, fix assert syntax

* fix assert

* Update test/integration/targets/cloudformation_exports/tasks/main.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* fix export name

* renamed module

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
4 years ago
Stefan Horning 652346ad5d
Allow passing through of (almost) all params available … (#58118)
* Allow passing through of (almost) all params available on boto methods in aws_api_gateway

* Linting and docs fixes

* Refactored method signature of create_deployment() to use keyword args instead of named args

* Updated version_added flags to 2.10

* Cleanup and improve aws_api__gateway integration test play. Also included new params into test.

* Fixed RETURN docs and some ttests

* Completed RETURN docs and made integration tests match

* Fixed variable names in test and YAML syntax in docs

* Comment out critical sections of integration test

* Fixed update test after figuring out what the error message means. Also updated error message to be more descriptive.

* Fixed test assertion

* Update docs and make tests reflect that endpoint type wont be changed on updates

* Syntax fix

* Add changelog fragment

* Improve aws_api_gateway docs, fix typos.

* Quote doc lines with colon
4 years ago
Andrew Klychkov a81ab5fe40
mysql_db: add possibility to make dump with --no-create-db option (#67767)
* mysql_db: add possibility to make dump with --no-create-db option

* add changelog fragment

* fix
4 years ago
Abhijeet Kasurde ed306c7991
influxdb: Fix documentation (#67807)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Nilashish Chakraborty 3405ee1c01
Add iosxr_static_routes RM (#65181)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
4 years ago
Brian Scholer 9afe87139a
Add win_psrepository_info module (#67594)
* Add win_psrepository_info module

* Change return type

* Add tests for win_psrepository_info
4 years ago
Andrew Klychkov 10feb24870
mongodb_shard: fix doc formatting (#67750) 4 years ago
Mark Chappell d5c17118ed
s3_bucket - cleanup and test stabilisation. (#66778)
* AnsibleAWSModule related cleanup - s3_bucket

* Add extra information to s3_bucket timeout failures, it's possible the comparisons are doing something weird...

* Move Bucket Encryption boto support logic into the pre-flight checks

* Use the built in required_by logic

* Rework s3_bucket integration tests

* Add a retry around put_bucket_encryption

s3_client.put_bucket_encryption is occasionally dropped on the floor
by Amazon add some logic to retry s3_client.put_bucket_encryption call

* Catch OperationAborted and retry, it is caused by a conflicting change
still being in progress.   (For example an Encryption setting applying)

* Make sure we don't explode if the botocore version's too old

* Review tweaks
4 years ago
Markus Bergholz 9463d28967
read enabled_key_rotation status also in aws_kms_info (#67770)
* read enabled_key_rotation status

* add changelog

* use AWSRetry decorator to prevent api rate limits

* fix pip8
4 years ago
sky-joker 454b043c13 Reflect changed JSON structure than zabbix version 4.4 or more to zabbix_user
add fragments file

Fix several pointed out

https://github.com/ansible/ansible/pull/67475#discussion_r380528775
https://github.com/ansible/ansible/pull/67475#discussion_r380532685

Enable integration test
4 years ago
Jill R 5550fc442b
Mark aws_acm unstable and connection_aws_ssm disabled (#67787)
* Mark aws_acm and connection_aws_ssm unstable

CI failures in https://app.shippable.com/github/ansible/ansible/runs/160867/133/tests
and https://app.shippable.com/github/ansible/ansible/runs/160867/129/tests

* Disabling concection_aws_ssm, it's repeatedly failing on this PR
https://app.shippable.com/github/ansible/ansible/runs/160888/133/tests
4 years ago
Andrew Klychkov dd53c104d7
postgresql_info: move subscription info to corresponding database dict (#67772) 4 years ago
Matt Clay b68e55da26
Remove `test/legacy/` directory. (#67786)
* Remove `test/legacy/` directory.

* Remove references to `test/legacy/` directory.

* Update the remaining valid legacy reference.

* Remove outdated legacy references.
4 years ago
Sumit Jaiswal d8c5c6eb9d
Add Switchport mode support in newly introduced *_l2_interfaces resource module (#67456)
* fixes 65032
4 years ago
Prasad Katti a1f26af712
ec2_instance - update tests related to termination protection (#65035)
* ec2_instance - update tests related to termination protection

* add more test cases for termination protection
4 years ago
Paul Belanger 9c221e2bfa
Remove unused import from test_eos_static_routes.py (#67776)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Matt Clay e3591223a0
Second batch of incidental integration tests. (#67765)
* Update incidental test aliases.

* Rewrite target references for renamed targets.

* Add incidental tests to CI.

* Update sanity tests for incidental cloud tests.

* Initial copy of incidental tests.

* Copy contrib files into test.

* Update paths in test.

* Add support plugins.

* Update plugin to work around missing deps.

* Update sanity ignores.

* Fix matrix entries.

* Remove debug echo.
4 years ago
Matt Clay a19ae28326 Test the delay option in wait_for_connection. 4 years ago
flowerysong 370f788731
adhoc: Load callbacks before sending v2_playbook_on_start (#67673) 4 years ago
Mark Chappell 9d455bed7b
aws_acm Add additional AWSRetry error codes (#67671)
* Cleanup tests

* Auto-Retry on ResourceNotFound and RequestInProgress exceptions

* Use AnsibleModule options for required_if logic

* changelog

* Remove (now) duplicate RequestInProgressException catching

* Allow a single retry when attempting to fetch the information about a cert directly after deleting it.

There is a small chance that it goes away while we pull the details.
4 years ago
Markus Bergholz 99f6f0c832
add key rotation option to aws_kms (#67651)
* add key rotation option

* add changelog fragment

* provide version added as string

* change changelog to minor_changes

* Update changelogs/fragments/67651-aws-kms-key-rotation.yml

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Update lib/ansible/modules/cloud/amazon/aws_kms.py

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* prevent key upgrade if key rotation was enabled manually. In that case, the key rotation would be disabled, if not mentioned in the playbook

* Update lib/ansible/modules/cloud/amazon/aws_kms.py

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Update lib/ansible/modules/cloud/amazon/aws_kms.py

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Update lib/ansible/modules/cloud/amazon/aws_kms.py

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

Co-authored-by: Mark Chappell <mchappel@redhat.com>
4 years ago
Andrew Klychkov f0159b8870
postgresql_info: add getting publication statistics (#67614)
* postgresql_info: add getting publication statistics

* add changelog

* fix

* fix server_version check
4 years ago
Andrew Klychkov b9a315a2c0
mysql_db: add dump_extra_args parameter (#67747)
* mysql_db: add dump_extra_args parameter

* add changelog fragment
4 years ago
Sloane Hertel 8eb00dd14c
Fix inline vaults for plugins in ensure_type (#67492)
* Fix implicit string - only looked right because of the vault __repr__
* Add tests for strings and implicit strings
4 years ago
GomathiselviS 726d6455d8
eos static_routes module added (#65480)
* Adding files for RM static_routes

* Added Integration tests

* Added Unit testcases

* Addressed review comments

* corrected lint errors

* corrected documentation errors

* Lint errors

* corrected test/sanity

* corrected documentation for deprecation

* corrected case sensitivity

* Again Documentation eroor

* Lint errors again

* corrected deprecated module in ignoretxt

* added new gethered,rendered,parsed state checks to unit test

* New code broke the old flow-fixed

* Lint errs

* Added check for running_config

* Add rtt testcase

* Fixed unit tcs

* lint errors

* lint errors

* Modified replaced operation behavior

* updated documentation and tests for delete opration

* fixed shippable errors

* review comments and flake8 error fix

* syntax errors fixed
4 years ago
Matt Clay 4e571248a9
First batch of incidental integration tests. (#67717)
* Initial copy of incidental network tests.

* Update incidental test aliases.

* Add incidental tests to CI.

* Rewrite module references in tests.

This should not be necessary once module redirection is supported.

* Rewrite target references for renamed targets.

* Add support collections for incidental tests.

* Add ignores for test support code.

* Remove echo used for debugging.
4 years ago
Paul Belanger 81ffc315a4
Remove unused imports for iosxr_acls (#67711)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Paul Belanger fc69f63cec
Remove unused imports in eos_modules unittest (#67709)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Paul Belanger bfea5cfca0
Remove unused imports from vyos_firewall_global (#67710)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Sam Doran 7b792e0a53
Skip lookup_hashi_vault test for Python 2.6 (#67657) 4 years ago
Jill R 96244c4cde
Make AWS test plugin to refer to the aws-permissions-for-integration-tests (#67665)
Make AWS test plugin to refer to the aws-permissions-for-integration-tests section of the AWS devel docs now that we have them, rather than suggesting to flag down specific users.
4 years ago
Graeme Davidson bd26b6c0b4
updated single quote handling to not strip and error on odd number (#67500)
Fixes #67274
4 years ago
Rick Elrod eab914426b
Specify display width and no color in test_execute_list_collection_no_valid_paths (#67680)
This ensures the test passes regardless of the test environment.
Previously, it would pass in some environments but fail locally
in other environments, due to the width being calculated as
different or support for color not being consistently detected.

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Sam Doran 32a71221e8
Fix wakeonlan test for newer FreeBSD (#67656) 4 years ago
John Barker 9b91068e23 Remove unused DCI script 4 years ago
GomathiselviS d283126c31
eos_acls : Add eos acls resource module (#66308)
* Adding files for RM static_routes

* Added Integration tests

* Added Unit testcases

* Addressed review comments

* corrected lint errors

* corrected documentation errors

* Lint errors

* corrected test/sanity

* corrected documentation for deprecation

* corrected case sensitivity

* Again Documentation eroor

* Lint errors again

* corrected deprecated module in ignoretxt

* added new gethered,rendered,parsed state checks to unit test

* New code broke the old flow-fixed

* Lint errs

* Added check for running_config

* eos_acls resource module added

* Corrected errors

* corrected documentation errors

* corrected typo

* Testcases in progress

* Integration tests in progress

* Integration tests

* Added Intergration tcs

* Corrected pylint errors

* Resolving issues due to rebase

* Corrected Typo

* more pylint errors

* more pylint errors

* more pylint errors

* Documentation

* Documentation

* More lint errors

* Fixed Indentation

* Indentation issues - not getting fixed

* Indentation issues - not getting fixed

* Added rtt testcase

* Corrected whitespaces

* addressed review comments

* moved integration tests to common - to support eapi tests

* modification for merge update

* indentation errors

* added line key

* Fixing shippable errors

* fixing doc errors

* fixing doc errors

* fixing doc errors

* fixing doc errors

* fixing indentation

* modified replaced operation

* rebase issue fixed

* Corrected typo

* review comments and flake8 error fixed
4 years ago
Paul Belanger 74e948e6e4
Fix flake8 errors with eos_acl_interfaces (#67695)
Theses were exposed by our collections testing.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Rohit fc05c50b7f
VyOS: firewall global module added (#66800)
* firewall global module

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixed

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* test updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* group member handling updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
4 years ago
Nilashish Chakraborty b818436c5f
Add iosxr_acls RM (#66207)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
4 years ago
GomathiselviS 3acd8f6f7f
Fix to - nxos_lag_interfaces not idempotent (#67359)
* Added fix for bug # 54400

* Adding files for RM static_routes

* Added Integration tests

* 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.

* Adding files for RM static_routes

* 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.

* Fix to #67169

* corrected rebase spillover

* indentation errors fixed

* modified integration testcase
4 years ago
Matt Clay 2dadc259d3
Split hcloud tests into two CI groups. (#67683)
* Split hcloud tests into two CI groups.

This will hopefully resolve CI failures when running with code coverage.

* Fix smoketest logic.
4 years ago
Matt Clay 4a885072af Split vyos tests to avoid timeouts with coverage. 4 years ago
Matt Clay a64b562071
Fix up network testing on Shippable. (#67678)
This prepares for code coverage collection for initial setup of incidental test coverage.
4 years ago
Xu Yuandong dbaa421f9d
Some cloudengine modules miss "import __future__" and "mateclass", update to add them. (#67634)
* update doc missing future & mateclass.

* update ignore.txt.

* add a changelog.

* update changelog.
4 years ago
Matt Clay 482885e0c8 Fix network setup for collections in ansible-test. 4 years ago
Matt Clay 542d1b98ff
Support private test plugins in ansible-test. (#67660)
* Support private test plugins in ansible-test.

This feature is exclusively used for testing Ansible itself and is not available to collections.

Content in the newly supported directories will be added in follow-up PRs.

* Add new directory to path classification.

* Support new paths in shebang test.

* Add new directory to manifest.
4 years ago
Moritz Grimm 79dfae9624
copy: ensure _original_basename is set: fixes #47050 (#47238)
* fixed #47050

* added changelog fragment

* added quick and basic test

* Revert "added quick and basic test"

This reverts commit 75f4141656.

* added better tests

* now also creating files to copy on the remote

* removed tests for recursive copying which is not supported by remote_src
4 years ago
Yanis Guenane 34800fe027 Test: Bump Tower version to latest release 4 years ago
GomathiselviS 600d6278f9
eos : Add resource module eos_acl_interfaces (#67137)
* Added fix for bug # 54400

* Adding files for RM static_routes

* Added Integration tests

* 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.

* Adding files for RM static_routes

* 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.

* acl_interfaces

* acl_interfaces in progress

* Adding unit testcases

* Addresses Paul's review comments

* worked on shippable errors

* indentation errors

* Modified unit tests

* indent issues

* indent issues

* eos specfic changes

* making the integration tcs skip the zuul run

* addressed review comments

* added required:True documentaiton
4 years ago
Xu Yuandong 347e19178d
Some cloudengine modules miss "import __future__" and "mateclass", update to add them. (#67635)
* update doc, missing future & metaclass type.

* update ignore.txt

* add a changelog.

* update changelog.

* rename changelog.

* update changelog.
4 years ago
Mark Chappell 021ba057ab
sns_topic ensure "changed" works as expected when managing delivery policies (#60944)
* sns_topic: (integration tests) Move the tests over to using module defaults

* sns_topic: (integration tests) Add test for behaviour of changed when using delivery_policy

* sns_topic: ensure "changed" behaves properly when managing delivery policies

- a delivery_policy isn't an IAM policy, so compare_policies didn't cope with it
- AWS automatically adds an additional option when you set an HTTP delivery
  policy

* Parse the delivery policies so we can test the changes properly
4 years ago
Mark Chappell 9c6495d4d4
elb_target / elb_target_info : Integration test fixups (#61256)
* Update AWS policy to enable management of TargetGroups

* elb_target: (integration tests) migrate to using module_defaults

* elb_target: (integration tests) lookup the AMI by name rather than hard coding AMI IDs

* elb_target_info: (integration tests) finish rename of integration test role

* elb_target: (integration tests) rename various resources to consistently use {{ resource_prefix }}

* elb_target_info: (integration tests) Migrate to using module_defaults

* elb_target_info: (integration tests) Lookup AMI by name rather than hard coding AMI IDs

* Apply suggestions from code review

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* elb_target: (integration tests) Remove the 'unsupported' alias

* Try bumping up the timeout

* Rules don't permit 'shippable' (resource_prefix uses this when run in shippable)

* Try bumping up more timeouts :/

* Avoid double evaluation of target_health assertion

* Simplify target_type usage a little (rather than constantly performing a lookup)

* mark elb_target tests 'unstable' for now, they're slow

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
4 years ago
Alan Rominger cffead4631
Do not error if collection specified null dependencies (#67575) 4 years ago
Andrew Klychkov 0dc08f6b97
postgresql_info: add subscription info (#67464)
* postgresql_info: add subscription info

* add changelog
4 years ago
Jordan Borean 36def8bf03
Use Ansible to load ps module utils in arg spec checker (#67596)
* Use Ansible to load ps module utils in arg spec checker

* Added changelog and note
4 years ago
Felix Fontein c520d70bf4
Templating: make sure only one variable results are cached (#67429)
* Make sure only one variable results are cached.

* Add changelog.

* Add test.
4 years ago
Matt Martz c61c0f7ad5
Add warning when running devel (#67502)
* Add warning when running devel. Addresses #67362

* Add config entry to disable devel warning, so it doesn't impact CI

* Update warning about using devel
4 years ago
Mark Chappell 3aae025cce
cloudfront_distribution: Always add field_level_encryption_id to cache behaviour (#61271)
* cloudfront_distribution: (integration tests) Migrate to using module_defaults

* cloudfront_distribution: (integration tests) Use the ID rather than the alias

Using aliases requires providing a valid SSL certificate, as such we're not longer able to test using an arbitrary hostname

* cloudfront_distribution: (integration tests) Make sure we delete the test s3 bucket when tests fail

* cloudfront_distribution: field_level_encryption_id is now a mandatory field always add it

Setting the field to an empty string has the same effect as the original behaviour.

* Copy & Paste fixup

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
4 years ago
Matt Clay 19f6fc68d4
Relocate Shippable tools. (#67556)
* Move Shippable tools to hacking directory.

These limits the `test/utils/shippable/` directory to scripts required for CI.

* Fix `test/utils/shippable/` file classification.

* Update package-data sanity test.
4 years ago
Felix Fontein 4373863f25
Module validation: sanity check mutually_exclusive, required_if, required_xxx ... (#66961)
* required_if checks should have three or four parts.

* Validate mutually_exclusive, required_together, required_one_of, required_if and required_by.

* Simplify code.

* Improve messages.

* Add changelog.

* Sanity check.

* Update docs.

* Update ignore.txt.

* Don't continue with tests when terms are not strings.

* Remove ignore.txt entry.

* Make sure validate-modules doesn't choke on things already flagged by schema test.

* Check required_if requirements list for strings.
4 years ago
Felix Fontein 29ca9d2d4d
openssl_* modules: improve test robustness (#67568)
* Run Ed25519 and Ed448 tests for openssl_csr and openssl_certificate only if key generation succeeded.
* Make openssl_privatekey tests more robust: allow special key generation tests to fail with 'algorithm not supported' on FreeBSD.
4 years ago
Christophe Drevet-Droguet e867535a57
regex_replace multiline support (#65051)
* document multiline parameter for regex_replace
* add changelog fragment
* tests for regex_replace_multiline
4 years ago
Mark Chappell 6d97943c82
New module ec2_tag_info - fetch the tags from EC2 objects (#66839)
* New module ec2_tag_info - fetch the tags from EC2 objects

* Add ec2_tag_info to group/aws

* Add basic test case
4 years ago
Andrew Klychkov 9d8bd225af
postgresql_subscription: remove stat (#67470) 4 years ago
Mikhail Yohman cceb517aff
IOS: Add voice vlan to ios_l2_interfaces (#67211)
* Add voice vlan to ios_l2_interfaces

* Fixed pep8 issues, added voice vlan to tests, updated module docs
4 years ago
Nilashish Chakraborty e632d93371
Add iosxr_acl_interfaces RM (#66936)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
4 years ago
Paul Belanger 493dda94e9
Remove unused imports for vyos (#67550)
These flake8 errors would caught in our collection testing.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Jordan Borean d7059881a2
win_credential - fix wildcard name (#67549) 4 years ago
Matt Clay b8f0cfc38a Move scaleway_s3 tests to the legacy directory.
These tests rely on the AWS S3 modules, but will not be migrated along with those modules into an AWS collection.

Since these tests will not reside in a collection alongside the modules under test they are being moved to the legacy tests directory.

The legacy tests directory will soon be migrated to a separate repository.
4 years ago
Matt Clay 704e7a5055 Rename callback_retry_task_name test.
Avoid confusion with other `callback_` prefixed tests.
4 years ago
Felix Fontein 0f56ac018b
Add x509_crl module (#63435)
* Add x509_crl module.

* Add integration tests.

* Fix some errors.

* Fix inversion.

* Compare name instead of tpye.

* Fix fail_json() calls.

* Work around rename of serial_number attribute for cryptography 1.4.

* Don't die for non-cert loading errors.

* One more.

* Fix function call.

* Fixed/improved descriptions.

* Don't read issuer from certificate file.

* Allow to ignore timestamps.

* Default value for revocation_date.

* Update tests.

* Mention ignore_timestamps in update docs.

* Support privatekey_content, and require some options only if state is present.

* Allow to pass certificate in directly.

* Add tests.

* Fix required_if.

* Forgot to encode content.

* Forgot to adjust type.

* Allow to return CRL's content directly.

* return_crl_content -> return_content (as in #65400).

* Fix elements.

* Fix messages.

* Use required_one_of and mutually_exclusive instead of doing the checks by hand.

* Fix format.

* Skip tests on AIX.

* Fix typo.
4 years ago
Mark Chappell 1bdbbd2784
Attempt to rebalance the aws tests (#67523) 4 years ago
Rohit 9eb7709c61
Vyos static route module added (#62193)
* Vyos static route module added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* empty config traceback fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity check fix

* model specific changes and SI test cases updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* new state changes and SI test cases updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* UT cases added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* replaced operation fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* review comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* shippable fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* delete opr updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
4 years ago
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
Jordan Borean 6b111e46ba
Win tests - prepare for collection migration in tests (#67506) 4 years ago
Sam Doran c64202a495
ansible-galaxy - fix role list bug (#67391)
Properly list roles even when the role name is the same or a substring of the
path to the role.
4 years ago
Jordan Borean 343de73f2d
Rebalance Windows groups for devel run (#67496) 4 years ago
Matt Clay 36ed3321fd
Disable failing zabbix_user test. (#67487)
* Disable zabbix_user test on aix.

* Disable failing zabbix_user test.
4 years ago
Rohit e76630c4e4
VyOS: firewall_rules module added (#65680)
* firewall_rules module added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* state fact gathering code

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* facts and operation code added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* unit tests added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* delete opr updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
4 years ago
Jordan Borean 38f26ffcc7
win_domain_object_info: new module (#67450)
* win_domain_object_info: new module

* Added basic integration tests
4 years ago
Brian Scholer be26f4916f
win_dns_client DHCP improvements + more (#66451)
* Fix DHCP support in win_dns_client + more

* Fix bugs and test failures, add changelog fragment

* Add idempotency tests for DHCP

* Address review feedback; dedup address-family code

* Remove legacy function

* Remove old reference
4 years ago
CWollinger 274a07e7c7
Add module ipwcli_dns.py to manage DNS records on Ericsson IPWorks (#67135)
* Create ipwcli_dns.py

* add newline at the end

* Update after review and support AAAA

* Update lib/ansible/modules/net_tools/ipwcli_dns.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* add integration tests and change param user to username

Co-authored-by: Felix Fontein <felix@fontein.de>
4 years ago
Lukas Bestle 31a6a37329
Add integration tests for the mas module (#67442)
* Add integration tests for the mas module

See https://github.com/ansible/ansible/pull/19768.

* Implement review feedback
4 years ago
Emmanuel MICKIEWICZ 8647d0a873
Removing a cron file when the 'name' parameter is specified is now allowed (#57471). Added integration tests to validate new behavior. (#65640)
Also added user input validation to return a clear error when deleting an environment variables without specifying a name.
4 years ago
Felix Fontein b1de5d43fc
openssh_keypair and openssl_privatekey: add regenerate option (#67038)
* Add regenerate option to openssh_keypair and openssl_privatekey.

* Add changelog.
4 years ago
Felix Fontein 55cb8c5388
docker_login: fix permissions for ~/.docker/config.json (#67353)
* Fix permissions for ~/.docker/config.json.

* Add changelog, remove debug output.
4 years ago
Jill R c9b38bd74e
ec2_snapshot and ec2_snapshot_info test suite (#65896)
* ec2_snapshot and ec2_snapshot_info test suite

* Add a fact to make tests easier to follow.
Test all return values, and add missing RETURN docs to module.
4 years ago
Andrew Klychkov 59bcc9f739
Bugfix of 67377: postgresql_set converts value to uppercase if "mb" or "gb" or "tb" is in the value string (#67418)
* Bugfix of 67377: postgresql_set converts value to uppercase if "mb" or "gb" or "tb" is in the value string

* fix CI

* add changelog
4 years ago
Prasad Katti f21ee7f685
cloudformation - use mutually_exclusive for on_create_failure and disable_rollback (#65629)
* cloudformation - use mutually_exclusive for on_create_failure and disable_rollback

* cloudformation - remove unit test test_disable_rollback_and_on_failure_defined
4 years ago
sky-joker d0443909ff
Zabbix: add integration test for zabbix_user module (#66418)
* add integration test for zabbix_user module

* Fix syntax mistake

* remove unsupported languages ​​from integration test
4 years ago
Markus Fischbacher 98bc53d3cb
zabbix_action - allowing string for esc_period (#66841)
* allowing string for esc_period

* add changelog fragment

* Update zabbix_action.py

* remove now unneeded test
4 years ago
Andrej Svenke f98874e4f9
ec2_asg: max_instance_lifetime and respect wait on replace (#66863)
* ec2_asg: max_instance_lifetime and respect wait on replace

* ec2_asg: max_instance_lifetime integration tests

* ec2_asg: address review comments
4 years ago
Dusan Matejka d2f4d305ee
Zabbix host tags & macros integration tests + zbx server version increase (#66997)
* bumped zabbix integration tests to be run against current LTS 4.4

* macros and tags tests for zabbix host + naming changes due to switch to zabbix 4.4
4 years ago
Mark Chappell c36f03b3e1
Add AWSRetry decorator to ec2_vpc_nacl (#67204)
* Add AWSRetry decorator to ec2_vpc_nacl

* Also add a decorator to ec2_vpc_nacl_info to catch things like API rate limit errors.

* add double-removal integration tests to make sure things don't get too slow

* Fixup retry usage for _info

* Simplify changed logic when modifying a NACL

* tweak error message
4 years ago
Oliver Kastler 0760a7ec08
Fix for shared snapshot parameter (#60250)
* Fix for shared snapshot parameter

Fixing this bug:
`Unknown parameter in input: "IsShared", must be one of: DBInstanceIdentifier, DBSnapshotIdentifier, SnapshotType, Filters, MaxRecords, Marker, IncludeShared, IncludePublic, DbiResourceId`

* Updated documentation for shared snapshots

Tags can't get accessed for shared snapshots

* fixed indentation

* added test for shared snapshot

* fixed isPublic parameter to correct IncludePublic parameter

Co-authored-by: Oliver Kastler <oliver@realestate.co.nz>
4 years ago
Sam Doran 7ae34cef15
Fix role list regression (#67436)
Add the roles_path parent to the role_parser
object, so paths are passed to the list function

Add basic role list tests to prevent future regressions
4 years ago
Vasili 9b28f1f5d9
Fix incorrect "Could not match supplied host pattern" warning (#66764) (#67432) 4 years ago
Matt Clay c45d193af4 Rename some integration tests.
This avoids confusion with tests named `inventory_*` which do not test inventory plugins.

Tests for inventory scripts are now prefixed with `script_inventory_`.
4 years ago
Jan Meerkamp 1d370bd189
VMware: vcenter_folder nested folder absent fix (#65283)
- no longer try to create folder which exists.
- correctly remove nested folders with absent.
4 years ago
Abhijeet Kasurde 7000c51c06 VMware: Add support for specify tag and category as dict
User can now specify tag and category using dict in vmware_tag_manager
module. This is useful when tag or category name contains colon.

Fixes: #65765

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Sam Doran f506fd4730
Add ansible-galaxy collection list command (#65022)
* Start adding ansible-galaxy collection list options

* Working list all collections and list a specific collection

* Nuke debugging cruft

* Use to_text to get a string of the FQCN for sorting

* Improve collection output formatting

- add header
- display collection name and version in separate columns
- width of columns is dynamic based on collection name and version length

* Make role list output match collection output list

- add header
- add columns for role name and version
- make column width dynamic based on name and version length

* remove debug statemnt and extra header

* Revert "Make role list output match collection output list"

This reverts commit a0b3db47bb3b198aafd34c1f1be5b6561af2f928.

* Add validate_collection_path function

Utility function for ensuring a collection target ends with 'ansible_collection'

* Use validate_collection_path

* Do not warn if a specific collection in found in any search path

* Fix extraneous warning and remove duplicate code

Do not warn when listing a specific collection and it does not exist
in other collection paths.

Restructure the code that loops through collection paths to remove
duplicate conditional code.

* Indicate role path was found

* Use new function name

* WIP Save Point

* Use separate functions for role and collection list

* Wrap error message

There may be a better way to do this besides hard coding a line break, but this
does make the message a lot more readable.

* Add validate_collection_path function (#66441)

* Add validate_collection_path function

Utility function for ensuring a collection target ends with 'ansible_collection'

* Fix bad syntax

* Correct docstring

* Bikeshed the names

* Properly list a single role

* Simplify _display_warnings()

Only display warnings. Move exception raise back to each caller.

* Move private methods to private functions

They don't need self, so it makes sense to have them as functions
Get rid of _display_warnings() function since it doesn't do anything worthy of
an independent function.

* Add integration tests for ansible-galaxy collection list

* Fix docs sanity test

* Fix bug where ansible_collections dir does not exist

The path may exist, but if there is no ansible_collections dir inside that path,
an exception was raised in find_existing_collections().

Add integration test for this scenario

* Put execute_list() method back

* Add some informational messages for debugging

* Add unit tests

Units tests for the various private methods in support of collection list

* Start adding unit tests for test_execute_list

* Display collection path when listing specific collection

* Add unit tests for listing all collections and specific collection

- Create fixture for creating test objects
- Add function for controlling os.path.isdir results

* Set defaults for minimum collection widths

Ensure that collections with small FQCNs display correctly.
Add unit tests

* Split up unit tests and fix fixtures

Add more fixtures for mocking objects during the specific collection tests

* Change help message for -p in list subcommand

Give accurate description of what it actually does rather than trying to use language shared between sub commands.

* Disable colorized output in unit test

* Add docs for collection list

* Fix integration test on macOS

The temp file path is really long on macOS, so the warning message gets wrapped
across multiple lines. That make seth grep fail. Switch to matching on a smaller
part of the warning.

* Recreate common path options for collections

Improve help about what the '-p' option does and how it works.

* Remove unnecessary elif after continue statements

* Account for duplicate paths in collections_searh_paths

If someone specifies the same path via '-p' that is the COLLECTIONS_PATHS,
do not list the collections twice.

* Docs updates
4 years ago
Sloane Hertel 97f011cf94
Add verify subcommand to 'ansible-galaxy collection' (#65618)
* [WIP] Add verify subcommand command to 'ansible-galaxy collection'

* Fix pep8 and use consistent display order

* WIP - docs

* Remove some redundancy in verify display messages by using an error queue for each collection

* Share common code and improve output format

* clean up documentation

* typo

* Apply suggestions from code review

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Move ModifiedContent namedtuple to the global scope

Add a public metadata property

Rename function to _get_json_from_tar_file

* Add some unit tests

* fix using common functions after rebase

* changelog

* Improve efficiency finding specific installed collections

Improve efficiency by only downloading the tar.gz from the galaxy server for comparison after checking that the collection has been installed

Handle multiple collection paths

Fix up tests

* pep8

* reword that for accuracy

* use more common code and verify collection name

* Improve error message and add documentation

* Update unit tests and add coverage for both local and remote collections that are unable to be located

* Only validate collections using the format collection_namespace.collection_name

Fix tests to reflect that

Fix documentation

* Fix a bug when a local collection does not contain a file

* pep8

* Fix formatting

Co-authored-by: Sandra McCann <samccann@redhat.com>
4 years ago
Mark Chappell 1b9b551b61
Explicitly chose an AZ for cloudformation and ec2_vol tests (#67425)
us-east-1e is sometimes picked at random, and has no support for
t3/m5 instance types, which breaks some tests.

Because availability_zones is returned in a consistent (sorted) order,
we should at least get either consistent success or consistent failure.
4 years ago
Gonéri Le Bouder 0c597f4434
vmware_guest_register_operation/test: no deprecated mod (#67411)
Don't use `vmware_guest_facts` to collect the Guest information. The
module is deprecated and replaced by `vmware_guest_info`.
4 years ago
Jordan Borean 4881af2e7e
galaxy - Fix collection install dep resolver for bad versions (#67405)
* Also make sure version is a string and not an int/float
4 years ago
Mark Chappell 90898132e4
CloudRetry/AWSRetry : Disable catching of NotFound exceptions (#67281)
* CloudRetry/AWSRetry : Remove default catching of NotFound exceptions

* Add docs

* Changelog updates from review

* Update unit tests after removing 'NotFound' from default retries
4 years ago
Yanis Guenane b9bd2c25ca
Test: Bump TOWER_VERSION to supported version (#67378)
* Revert "Remove Tower module tests from CI. (#67368)"

This reverts commit b041d96762.

* Test: Bump TOWER_VERSION to 3.6.2
4 years ago
Jordan Borean 446a0c1b08
win_package - Refactor with msp, appx support (#66931)
* win_package - Refactor with msp, appx support

* Added msi test for ALLUSERS

* Added some msix tests, refactored tests

* Added remaining msix tests

* Enable msix sideloading for tests

* Added remaining exe path tests

* Added basic msp tests

* Remove url options now the util no longer has them

* Fix file version check for older Windows hosts

* Remove no_proxy ansible-test setting

* Use same mechanism of become to copy the file with explicit creds
4 years ago
Jordan Borean 2d9328cb0f
Added Ansible.Service util and win_service_info (#67367)
* Added Ansible.Service util and win_service_info

* Fix up util test

* Sigh forgot to update the test and fix sanity

* Try to make tests more robust

* That didn't work, just check the username

* Betraying Queen and country with this doc fix

* More changes for compat

* More OS compatibility
4 years ago
Matt Clay b041d96762
Remove Tower module tests from CI. (#67368)
* Remove Tower module tests from CI.

The required AMIs are no longer available.

* Mark Tower tests as unsupported.
4 years ago
tchernomax 53e043b5fe
combine filter: fine list handling (option b) (#57894) 4 years ago
Matt Clay a928db1420 Split out selinux setup in subversion test.
This avoids failures when the sefcontext module is not present.
4 years ago
Mark Chappell 8d574c3770
AnsibleAWSModule related cleanup - redshift (#66779)
* AnsibleAWSModule related cleanup - redshift

* Apply a backoff on modify_cluster to cope with concurrent operations

* Add AWS 'hacking' policy to allow creation of Redshift ServiceRole

* Adding the retry policies makes the redshift test suite more reliable
4 years ago
Gonéri Le Bouder 4231f34458 vmware: define more Zuul aliases
- vmware_content_library_info
- vmware_content_library_manager
- vmware_guest_disk
- vmware_host
- vmware_host
- vmware_host_firewall_manager
- vmware_host_ipv6
- vmware_host_powermgmt_policy
- vmware_vswitch
4 years ago
GomathiselviS 4ec1437212
Fix to - eos_vlans using state parameter replaced is giving odd behavior (#67318)
* Added fix for bug # 54400

* Adding files for RM static_routes

* Added Integration tests

* 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.

* Adding files for RM static_routes

* 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.

* fix to bug #67313

* fixing rebase issue

* fixing rebase issue

* addressed review comments

* addressed review comments
4 years ago
Denis Krienbühl a4ec18d8a3
Cloudscale Regions and Zones Support (#67165) 4 years ago
petoju 8ac0bbcbf6
mysql_replication: add option to fail on error (#67322) 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
Matt Clay a61dcfd542 Mark `mariadb_replication` tests unsupported.
Only one integration test target is supported per module. Since there is already a `mysql_replication` integration test, the `mariadb_replication` tests will not execute for the same module.

To avoid issues with tests not running on changes to the `mysql_replication` module and then failing after changes are made and all tests are executed, the test has been marked `unsupported` to prevent it from running in CI.

To re-enable this test for CI it will need to be merged into the `mysql_replication` tests, which will require working around conflicts between the packages required by the two sets of tests.
4 years ago
Matt Clay 9788daf13b
Split up more lookup integration tests. (#67328) 4 years ago
Matt Clay cad0110228
Rename kubevirt inventory plugin test. (#67326)
* Rename kubevirt inventory plugin test.

This maintains association of the test with the plugin.

* Update ignores.
4 years ago
Matt Clay 274417d424
Improve test compatibility with ansible-base. (#67325)
* Remove shells from test that will be migrated.

* Fix binary_modules test to work without win_ping.
4 years ago
Matt Clay efc5d62c49 Use a custom test module for module_defaults test.
This avoids a dependency on a module which will not remain in the repo after migration.
4 years ago
Matt Clay 8774b2f697 Use `package` for `pkgng` and `zypper` in tests.
This allows tests to run on other platforms when `pkgng` or `zypper` are not present.
4 years ago
Rick Elrod 236773bfea
Improve distribution unit tests (#67300)
* Include distro.{os,lsb}_release_info() in distro fixture generation script
* Add distro release information to existing fixtures
* Add some new fixtures for newer distribution versions
* Add fixture for Arch Linux with lsb-release
4 years ago
Matt Clay a3b7d67fb0
Split up platform cleanup in tests. (#67320)
* Split up platform cleanup for git test.

* Split up platform cleanup for ansible-galaxy test.
4 years ago
Mario Lenz 808bf02588
Remove options from some vmware modules that are not used in the code (#67282) 4 years ago
Nilashish Chakraborty 88f0c85228
Remove deprecated attributes from nxos_igmp_interface (#67186)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
4 years ago
Matt Clay 11eee1181a Split out platform specific cleanup in pip test. 4 years ago
Matt Clay 89c8eb5a08
Split up lookup integration tests. (#67294)
* Split up lookup integration tests.

* Rename lookup_paths integration test.

This will avoid confusing it for a test of the `paths` lookup plugin, which does not exist.

* Fix lookup_pipe integration test.

The test now verifies it receives the correct output.

Adding a second task also causes code coverage to be properly registered for the lookup plugin.

* Rename ini lookup test to match plugin name.

* Update sanity ignore path.
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 c32348088a Remove conflicting integration test aliases.
Modules and plugins can only have one integration test target associated with them.

When there is a conflict between alias(es) and/or the target name, only one target will trigger on changes to the module or plugin.
4 years ago
Gonéri Le Bouder b65fc3527f vmware_guest_tools_wait: disable the function test
The test fails randomly in the CI with a timeout.
4 years ago
Matt Clay 1110e9d80d Test AIX with smaller volumes. 4 years ago
Sloane Hertel 3f5aed056b
Integration tests for notify with variable list (#66423)
Co-authored-by: Luca Berruti <nadirio@gmail.com>

Co-authored-by: lberruti <nadirio@gmail.com>
4 years ago
Matt Clay 88efb24ff8 Rename aci_switch_leaf_policy_profile test. 4 years ago
Matt Clay d86dcedef1 Rename scaleway_ssh test. 4 years ago
Matt Clay c2f7c4ae47 Rename rabbitmq lookup test. 4 years ago
Matt Clay a42a76190e Renamed meraki_webhooks test. 4 years ago
Matt Clay a68a8ef2f1 Rename netapp_eseries_* tests to match modules.
This will allow the ansible-base migration script to recognize the tests as being associated with their respective modules.
4 years ago
Matt Clay 0d430c2ccc Rename digital_ocean_ssh_key test. 4 years ago
Matt Clay f02ceaf66a
Fix AWS test names and aliases. (#67232)
* Fix AWS test names and aliases.

* Add missing alias.

* Rename ec2_vpc_vpn_facts test.
4 years ago
Matt Clay 6a79bb2b91 Simplify package install in unarchive test.
This will enable the test to work on supported platforms when modules for other platforms are not present.
4 years ago
Matt Clay c92697acec Move tower_common tests with tower_organization. 4 years ago
Matt Clay c10f4a8156 Rename azure_rm_workspace test. 4 years ago
Matt Clay 415409c6e3 Rename azure_rm_virtualmachineimage_facts test. 4 years ago
Matt Clay 64567cf4f6 Split tasks for prepare_http_tests.
This allows setup of a platform to run even when modules for another platform are not present.
4 years ago
Matt Clay 80561ccef0 Improve sanity test handling in CI after migration. 4 years ago
Matt Clay 7724fb8f33 Split handler tasks for setup_remote_tmp_dir.
This allows a platform handler to run even when the module required for the other platform is not present.
4 years ago
Matt Clay a0242b2173 Improve unit test handling in CI after migration. (#67217)
* Improve unit test handling in CI after migration.

* Fix undefined var in bash 4.3 and earlier.

See https://git.savannah.gnu.org/cgit/bash.git/tree/CHANGES?id=3ba697465bc74fab513a26dea700cc82e9f4724e#n878
4 years ago
Felix Fontein f725dce936
Clean up FILE_COMMON_ARGUMENTS (#66389)
* Clean up FILE_COMMON_ARGUMENTS.

* postgresql_pg_hba doesn't declare the backup option.

* uri doesn't declare the remote_src option.

* Add documentation.

* maven_artifact seems to use directory_mode, which it doesn't declare.

* Update changelogs/fragments/66389-file-common-arguments.yml
Update docs/docsite/rst/porting_guides/porting_guide_2.10.rst

ci_complete

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>
4 years ago
Gonéri Le Bouder 802cc60242 vmware_guest_tools_wait: add timeout parameter
Add a new `timeout` parameter to `vmware_guest_tools_wait`.

Also, a functional test to cover the module.
4 years ago
Paul Belanger 4863efd0df
Remove yaml stdout_callback plugin from network-integration tests (#67203)
With the move to collections, yaml is no longer in ansible base. Switch
back to default stdout.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Gonéri Le Bouder 4a1115785f vmware_guest_network/test: disable the test
The test fails in the CI with a timeout of vmware_guest_tools_wait. It's
still unclear if this comes from:

- the ESXi environment
- the VM configuration, e.g: the amount of the RAM
- the ISO image itself

Ideally, we should have a light VM with the vmware-tools.
4 years ago
Paul Belanger bf4dac10fa
Revert "WIP: testing ansible-base (#67149)" (#67175)
I didn't properly update the commit message via github UI. Revert, to
open a new PR.

This reverts commit 2794142eb3.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Paul Belanger 2794142eb3
WIP: testing ansible-base (#67149)
Currently, yaml stdout_callback is not in base.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
4 years ago
Todd Lewis 640bf31f87
user - allow 'groups', 'append' with 'local' (#62134) 4 years ago
Paul Belanger c3635532d3
Revert "Allow httpapi for EOS resource modules (#66871)" (#67131)
This looks to be causing issues for our new ansible.netcommon
collection. Revert for now, until we can properly address.

This reverts commit 53c7f8cbde.
4 years ago
Andrew Klychkov 637eed5a5c
postgresql modules: fix sanity issues (#67046)
* postgresql modules: fix sanity issues

* add changelog

* fix changelog
4 years ago
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.
4 years ago
Matt Martz 0e46af17a5
Nuke all removed_module stubs (#67139)
* Nuke all removed_module stubs

* Remove ignores and botmeta entry
4 years ago
Ruediger Pluem 80c4b86abe
group - correctly determine if a local group exists. (#59772)
Fixes #58619
Add integration test
4 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>
4 years ago
Jordan Borean 78470c43c2
Removed deprecated items in Windows modules (#67105) 4 years ago