Commit graph

229 commits

Author SHA1 Message Date
John R Barker
084587913a
validate-modules: deprecated modules in collections (#68646)
* validate-modules: deprecated modules in collections

In Collections a module is marked as deprecated via meta/routing.yml

Use this file, rather than the leading `_` as part of the deprecated
test.

* Correct variable

* review comments

* indentation

* Read routing.yml only once

* pep8

* Apply suggestions from code review

Co-authored-by: Matt Clay <matt@mystile.com>

* review: remove duplicated conditional

Co-authored-by: Matt Clay <matt@mystile.com>
2020-05-07 08:11:46 +01:00
Toshio Kuratomi
39b3942048 Remove left hand side slicing
Left hand side slicing is confusing and slower but maybe more memory
efficient in some circumstances.  There is one case where it adds to
code safety: when it's used to substitute a different list in place of a
slice of the original list and the original list could have been bound
to a different variable in some other code.  (The most likely case of
this is when it's a global variable and some other code might import
that variable name).

Because of the confusion factor we think it should only be used for the
safety case or where it's been benchmarked and shown to have some sort
of documentatble improvement.  At the moment, only one piece of code
falls into those categories so this PR removes all the other instances
of left hand side slicing.
2020-05-06 09:56:40 -07:00
Felix Fontein
947fa3bad3
ansible-test validate-modules: don't allow arbitrary lists and dicts for 'default', 'sample' and 'example' (#69287)
* Don't allow arbitrary lists and dicts for 'default', 'sample' and 'example'.

* Add changelog.

* Make compile with Python 2.
2020-05-05 11:38:10 -05:00
Matt Clay
1cf26896c5 Default ansible-test provisioning to us-east-1.
Previously windows instances on Shippable would be automatically directed to us-east-2.
2020-04-30 11:04:37 -07:00
Rick Elrod
1c5c89baa6 Add RHEL 8.2 to CI
Change:
RHEL 8.2 GA was released this week, test it in CI instead of 8.1.

Test Plan:
CI

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-04-29 20:51:28 -05:00
Matt Clay
a050d892d8 Remove obsolete vcenter setup from ansible-test. 2020-04-26 19:56:40 -07:00
Matt Clay
d7da1d9bd0 Fix ansible-test coverage constraints. 2020-04-24 10:52:21 -07:00
Matt Clay
5a3ca0ae5f Fix ansible-test delegation from pip install. 2020-04-21 09:48:16 -07:00
Matt Clay
122743ae30
Update ansible-test handling of delegation paths. (#69056) 2020-04-20 22:04:25 -07:00
Yanis Guenane
46d82179d8
Testing: Add support for CentOS Linux On Power platform (#68130)
* Testing: Add CentOS Linux On Power platform

* Add arch designation to remotes.

This avoids overloading the provider with the arch.

Also add a changelog entry.

Co-authored-by: Matt Clay <matt@mystile.com>
2020-04-15 16:22:17 -07:00
Matt Clay
7d51706278 Revert "Switch network incidental tests to VyOS 1.1.7-R2."
This reverts commit 7d5177d6a0.
2020-04-14 12:18:23 -07:00
Matt Clay
7d5177d6a0 Switch network incidental tests to VyOS 1.1.7-R2.
The previous version being used, VyOS 1.1.8, is currently unavailable in AWS.
2020-04-14 01:12:48 -07:00
Matt Clay
a095172130 Fix ansible-test --docker without tests dir. 2020-04-09 18:12:21 -07:00
Felix Fontein
bae5f18f5c
ansible-test: don't trigger full CI run for changes to changelogs/ and docs/ in collections (#68550)
* Don't trigger full CI run for changes to changelogs/ and docs/ in collections.

* Add changelog fragment.

* Update changelogs/fragments/68550-ansible-test-docs-changelogs.yml

Co-Authored-By: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Clay <matt@mystile.com>
2020-04-09 02:53:34 -07:00
Rick Elrod
38b7ceb75a
Update docker.txt to use the OpenSUSE 15.1 container image (devel edition) (#68785)
* Update docker.txt to use the OpenSUSE 15.1 container image

Signed-off-by: Rick Elrod <rick@elrod.me>

* handle installing mysql on suse

Signed-off-by: Rick Elrod <rick@elrod.me>

* add changelog fragment

Signed-off-by: Rick Elrod <rick@elrod.me>

* Update changelogs/fragments/ansible-test-opensuse-15.1.yml

Co-Authored-By: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Clay <matt@mystile.com>
2020-04-09 00:26:59 -07:00
Matt Clay
04edd77c42
Update tests to use RHEL 7.8. (#68787)
* Update tests to use RHEL 7.8.

Keeping support for RHEL 7.6 since collections are still using it.

* Fix tests for RHEL 7.7+ due to extras repo name change.
2020-04-08 21:09:52 -07:00
Matt Clay
148e83f832
Fix ansible-test submodule handling. (#68759)
* Refactor ansible-test integration test.
* Add env --list-files option.
* Add tests for collection files tracked by git.
* Fix ansible-test submodule usage on older git.
* Fix submodule directory detection as files.
* Improve handling of nested source control.
2020-04-08 01:15:49 -07:00
Rick Elrod
13aef3c2e5
Add --docker-terminate flag to ansible-test (#68688)
* Add --docker-terminate flag to ansible-test

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-04-06 20:38:29 -05:00
Jordan Borean
6db66bcadd
Add relative module_util support for powershell (#68321)
* Add relative module_util support for powershell

* Added ansible-test classification support
2020-04-01 09:01:18 +10:00
Matt Clay
7323d5dd0d Fix references to old egg-info directory. 2020-03-30 13:56:43 -07:00
Matt Clay
735885d57c Fix ansible-test requirements installation. 2020-03-29 08:46:25 -07:00
Matt Clay
c888035e02
Update Ubuntu 18.04 test container to 1.13. (#68534) 2020-03-28 17:35:21 -07:00
Matt Clay
53a3d1ffdb Fix ansible-test change detection traceback. 2020-03-27 15:56:02 -07:00
Matt Clay
d8b5c11a63 Report error for coverage 5+ in ansible-test. 2020-03-27 12:29:02 -07:00
Matt Clay
27fc049993
Fix ansible-test code coverage collection. (#68502)
The last task in a play should now properly report code coverage.

This change should also eliminate empty coverage files, as well as incomplete coverage files resulting from early worker termination.
2020-03-27 12:24:08 -07:00
Jordan Borean
e12cea2c7c
ansible-test - fix up powershell module_util analysis for collections (#68422) 2020-03-24 23:44:50 -07:00
Yanis Guenane
fb2a7ce923 Testing: Move from ibmcloud to ibmps 2020-03-23 23:00:06 -07:00
Matt Clay
f1b3e8364e Fix ansible-test PATH handling. 2020-03-23 13:06:03 -07:00
Matt Clay
9765a80bd4
Fix ansible-test coverage analysis option usage. (#68406)
* Fix ansible-test coverage analysis option usage.

The `--input-dir` option for `coverage analyze targets generate` was being ignored.

No changelog entry since this feature has not yet been released.

* Move coverage config to fix type annotations.

Declaring the types before referencing them makes sure they're recognized by tools such as PyCharm.
2020-03-23 13:05:29 -07:00
Jordan Borean
7c9889a72b validate-modules - fix ps module delegate type inspection 2020-03-23 11:14:21 -05:00
Matt Clay
70827c7923 Fix ansible-test import analysis warning.
Fix overlooked in https://github.com/ansible/ansible/pull/68372/
2020-03-23 11:14:21 -05:00
Matt Clay
10fe54de58 Fix ansible-test module_utils import analysis.
Now empty `*.py` files are ignored during module_utils import analysis for change detection.
This eliminates "No imports found" warnings for files which should have no imports.
2020-03-23 11:14:21 -05:00
Matt Clay
cf75e3f526 Fix ansible-test import analysis for collections. (#68352)
* Fix ansible-test import analysis for collections.

* Ignore plugins/module_utils/__init__.py
2020-03-23 11:14:21 -05:00
Matt Clay
6fde9b3a23 Fix shebang sanity test module identification. 2020-03-23 11:14:21 -05:00
Jordan Borean
aaf575f0b2 Internally redirect win modules to collection name (#68317)
* Internally redirect win modules to collection name

* Added comment for how this should be fixed in a subsystem plugin

* add collection plugins for base tests
2020-03-23 11:14:21 -05:00
Matt Clay
2c7f8bf586 Fix ansible-test windows-integration module refs. 2020-03-23 11:14:21 -05:00
Matt Clay
41f6c73be0 Update ansible-test network test provisioning. (#68220)
* Update network provisioning defaults.

* Update network test requirements.
2020-03-23 11:14:21 -05:00
Matt Clay
5159457ba1 Fix ansible-test unit test requirements.
Requirements were incorrectly added to ansible-test in https://github.com/ansible/ansible/pull/61813

These requirements should have been placed into `test/units/requirements.txt` instead.
Now that the relevant content has been migrated out of the repository, the requirements are no longer necessary there either.

No changelog entry for this change since the original changes were not included in any release and also lacked a changelog entry.
2020-03-23 11:14:21 -05:00
Matt Clay
8715bc400a Add coverage filtering to ansible-test. (#68158)
* Relocate expand_indexes so it can be reused.

* Add generate_indexes function.

* Simplify type annotations.

* Add `coverage analyze targets filter` command.

* Add changelog entry.
2020-03-23 11:14:21 -05:00
Matt Clay
27ce6dbc1f Remove test support option from ansible-test.
This option was added to facilitate migration and is no longer needed.
2020-03-23 11:14:21 -05:00
Matt Clay
50442f9fdd Fix ansible-test handling of no Python coverage. 2020-03-23 11:14:21 -05:00
Matt Clay
99e136e153 Remove out-of-date test constraint on paramiko.
ci_complete
2020-03-23 11:14:21 -05:00
Matt Clay
1a8fdaadc7 Fix powershell coverage path rewriting.
This applies the same rewrite logic to PowerShell coverage as is used for Python coverage.
2020-03-03 14:07:29 -08:00
Matt Clay
29978d027b Update default test container to version 1.12. 2020-03-02 00:06:47 -08:00
Matt Clay
ebb255f0d3 Add Python 3.9 to ansible-test.
ci_complete
ci_coverage
2020-03-01 17:42:06 -08:00
Matt Clay
64a2864158 Fix ansible-test constraints for AWS. 2020-03-01 14:01:25 -08:00
Matt Clay
c06f442409 Fix ansible-test import sanity test venv setup. 2020-03-01 13:59:24 -08:00
Matt Clay
99e657162f Fix ansible-test module_utils analysis. 2020-03-01 12:29:54 -08:00
Matt Clay
70fc69c852 Fix vcenter requirements. 2020-02-29 13:49:26 -08:00
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.
2020-02-28 20:37:50 -08:00