Commit graph

622 commits

Author SHA1 Message Date
Matt Clay
2f6de3aea4 Add missing decorator to ansible-test sanity.
This fixes sanity test errors so they show the proper error code instead of "bound method".
2019-07-26 09:04:37 -07:00
Matt Clay
cf9999692a Fix ansible-test encoding issues.
This fixes `ansible-test sanity --list-tests` which was failing when `LC_ALL=C` was set.
2019-07-25 23:29:42 -07:00
Matt Clay
db7e9aa051
Use consolidated ignore.txt in ansible-test. (#59618) 2019-07-25 23:29:23 -07:00
Matt Clay
ba90263c22 Fix ansible-test cloud testing for collections. 2019-07-24 00:17:11 -07:00
Matt Clay
3c68a2e5f0 Ignore deleted when querying git in ansible-test. 2019-07-23 23:36:08 -07:00
Matt Clay
51083537fa Fix incorrect collections coverage warning. 2019-07-23 22:06:17 -07:00
Matt Clay
7c728118e6
Fix import sanity test for collections. (#59484) 2019-07-23 18:10:24 -07:00
Matt Clay
d65d8d6e13 Fix default pylint config for collections. 2019-07-23 17:14:10 -07:00
Matt Clay
44a262714c
Add common sanity ignore & skip to ansible-test. (#59416)
* Add common sanity ignore & skip to ansible-test.
* Switch ansible-doc sanity test to single version.
* Remove duplicate ignore entry.
2019-07-23 13:31:54 -07:00
Matt Clay
79eca9c8fb
Initial ansible-test support for collections. (#59197)
* Initial ansible-test support for collections.
* Include cloud config in delegation payload.
* Add missing types import and fix `t` shadowing.
* Fix plugin traceback when config_path not set.
* Fix encoding issues.
* Remove unused imports.
* More encoding fixes.
* Handle delegation outside exception handler.
* Inject ssh keys only if not already in place.
* More defensive approach to getting remote pwd.
* Add missing string format var.
* Correct PowerShell require regex.
* Rename `is_install` and `INSTALL_ROOT`.
2019-07-22 19:24:48 -07:00
Matt Clay
52ad0f3217 Update ansible-test sanity requirements.
Skip installation of packages on Python 2.x which are only used on 3.x.
2019-07-22 10:14:33 -07:00
Gonéri Le Bouder
e9b1e36d76 vcenter provider: avoid a TypeError exception
Avoid `TypeError: option values must be strings` with `ConfigParser`.
Default values must be string, not `None`.

The error happens when `test/integration/cloud-config-vcenter.ini` does
not have the `vmware_proxy_host` or `vmware_proxy_port` keys defined.
2019-07-22 11:19:39 +02:00
Matt Clay
b378e885ed Make ansible-test TestMessage hashable. 2019-07-19 21:34:04 -07:00
Matt Clay
4f1d0f1b39 Skip using paths for ansible-doc sanity test. 2019-07-19 16:17:56 -07:00
Yunge Zhu
cb201bfba1 add xmltodict to azure requirements file (#55748)
* add xmltodict

* fix lint
2019-07-18 01:32:51 -04:00
Matt Clay
cb0dfc9793 Prepare pylint test for collections support. 2019-07-16 11:24:16 -07:00
Matt Clay
2ed78b650f Update to ansible-test to prepare for collections.
Changes to simplify merging of collections support.
2019-07-16 08:04:07 -07:00
Matt Clay
4b9391f32a Clean up ansible-test target handling. 2019-07-15 20:33:23 -07:00
Matt Clay
4255ee8e5a Prepare ansible-test for collections support.
Another round of changes to prepare ansible-test for supporting collections to help keep later PRs a manageable size.
2019-07-15 17:46:29 -07:00
Matt Clay
f81238012b Clean up pylint issues in test infra. 2019-07-15 14:45:30 -07:00
Matt Clay
d910c971b4
Minor ansible-test code cleanup. (#59052)
* Minor ansible-test code cleanup.
* Fix type annotations.
2019-07-12 21:58:19 -07:00
Matt Clay
6645054329
Code cleanup for test infrastructure. (#59046)
* Remove useless object inheritance in test code.
* Remove unnecessary pass statements from test code.
* Comment on why certain pylint rules are ignored.
* Add more pylint test contexts.
* Fix import order.
* Remove unused variables.
* Remove unnecessary pass statement.
* Fix bad continuations.
* Remove unnecessary elif.
* Allow legitimate broad except statements.
* Allow legitimate protected access.
* Clean up names to make pylint pass.
2019-07-12 13:17:20 -07:00
Matt Clay
3f2b766d10 Add future and metaclass boilerplate to test code.
Continue to ignore:

- test/integration/
- test/legacy/
- test/units/
2019-07-12 09:18:24 -07:00
Gonéri Le Bouder
31baab85f9 ansible-test: vcenter through a HTTP proxy
Give the ansible-test user the ability to target a lab behind a HTTP proxy.
2019-07-12 10:56:36 +02:00
Matt Clay
6327a6114b Add ansible-test units --num-workers option. 2019-07-11 17:15:16 -07:00
Matt Clay
43c3b9fb0e Simplify ansible-test cwd setup. 2019-07-11 17:15:16 -07:00
Matt Clay
bc3a599678 Fix invalid type hints in ansible-test. 2019-07-11 14:25:57 -07:00
Matt Clay
86ad4c99ba Reorganize util code in ansible-test.
Code in util.py that depends on CommonConfig is now in util_common.py.
2019-07-11 08:54:13 -07:00
Toshio Kuratomi
33d2728879 Rename python files in hacking/ directory to have .py suffix
ansible-test only passes files which have the .py suffix for sanity
tests on python files.  This change will allow sanity tests to run on
the Python files in hacking/

* Rename test-module to test-module.py
* Symlink test-module for backwards compat since end users may be using
  test-module
* Fix test-module sanity errors that are now triggered
* Rename ansible_profile to ansible-profile.py
* Rename build-ansible
2019-07-10 22:17:35 -07:00
Matt Clay
c79afb1cba Move ansible-test unit coverage code into plugin. 2019-07-10 10:09:46 -07:00
Matt Clay
520af5cb47 Sanity test fixes for future collections support. 2019-07-10 07:03:48 -07:00
Matt Clay
1e1463401d
Prepare ansible-test for supporting collections. (#58886)
This is a small but incomplete set of the initial changes for supporting testing of collections with ansible-test.
2019-07-09 17:31:04 -07:00
Sam Doran
b9dafdbade
Move integration tests to using RHEL 8.0 GA (#57772) 2019-07-09 17:45:06 -04:00
Sam Doran
5ccd674dba
Update default test container to use Python 3.8.0b2 (#58877) 2019-07-09 17:44:16 -04:00
Andrea Tartaglia
da1a621bd9 Removed nested role for ec2_instance tests
Also moved environment setup and environment cleanup to separate task
files

Added CI group

Updated c4.large instances to t3.nano, use ENA enabled AMI

Updated AMIs with Amazon Linux AMI

Updated us-east-1 AMI id

Specify EBS size

typo, volume_size

Removed 'state: running', updated AMI with amz ami

Also added several wait: false to speed things up

Check for instance state, correctly

Accept pending as valid state

tags_and_vpc_settings do not wait for instance to complete

wait for termination protected instance

Updated IAM role name to match with policy

Skip env cleanup when in CI

Do not wait instance in external_resource_attach

ENI remove is done in env_cleanup/CI

wait some time for instance_profile instnace to be up

Updated ebs_optimized_images

Corrected task name

Added aws_cleanup var in cloud-config-aws

typo in runme

default aws_cleanup to true
2019-07-02 17:48:07 -04:00
Gonéri Le Bouder
2401154fc4 VMware: rename VMWare to VMware (#58535)
Follow the nomenclature convention decided in https://github.com/ansible/ansible/pull/56814
2019-06-30 19:30:42 +05:30
Sam Doran
8cfd0ba039 Allow for test groups with double digits (#58532) 2019-06-28 16:24:14 -07:00
Gonéri Le Bouder
e28bc46353 vcenter provider: set default values
Set default value for the following optional parameters:

- vcenter_port
- vmware_proxy_host
- vmware_proxy_port

This way we won't get an error if they are not define in the
configuration file.
2019-06-28 13:13:30 -04:00
Matt Clay
4403f866e3 Simplify Git class in ansible-test. 2019-06-27 18:01:02 -07:00
Matt Clay
b06f5634c5 Simplify ansible-test target expansion.
Targets are always expanded to full lists now instead of optimizing
for shorter lists by collapsing directories.

This change only affects unit tests and the ansible-doc sanity test,
as they were the only remaining tests using the old behavior.
2019-06-27 08:27:48 -07:00
Matt Clay
535e646a66 Add test for invalid ignore entries. 2019-06-24 13:13:32 -07:00
Felix Fontein
b78d23d4ad Use newer test container. 2019-06-24 12:32:57 -07:00
Sam Doran
7b9d991f78
Add Fedora 30 to test matrix (#57713)
Remove Fedora 28 from test matrix
2019-06-21 10:55:58 -04:00
Felix Fontein
505c99265c docsite: remove lexers which have been fixed in Pygments 2.4.0 (#57508)
* Remove lexers which have been fixed in Pygments 2.4.0.
* Add Pygments >= 2.4.0 to test runner.
* Fix pages that triggered lexer errors.

Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2019-06-18 10:56:33 -05:00
Alicia Cozine
5658b2ee3e
Adds custom 404 with cowsay image (#57422)
* Adds custom 404 with image, updates CI reqs, sets version latest for TOC links on 404 page
2019-06-17 10:47:54 -05:00
Matt Clay
37ea47c848 Fix python injection when using a virtualenv. 2019-06-14 14:27:07 -07:00
Sam Doran
84075fe351 Change RHEL8 image name to match changes in ansible-test (#57807)
* Change RHEL8 image name to match changes in ansible-test

Continue to use the beta version of RHEL 8 until we fix tests that are breaking with the GA version.

* Skip ufw integration test on RHEL 8 Beta
2019-06-14 13:47:26 -07:00
Sam Doran
4f61654fc5 Change default test container to version 1.8.1 2019-06-14 13:44:29 -07:00
Jill R
7ce85ee9e8
vcenter test provider handle config vars handling (#57813)
Make vcenter test provider handle config file vars the same regardless of
whether it comes from static config or from worldstream provisioning
2019-06-13 16:48:35 -07:00
Matt Clay
1e6edf2ccc Limit tests to paramiko < 2.5.0. 2019-06-10 10:56:11 -07:00