Commit graph

371 commits

Author SHA1 Message Date
Matt Clay
2feda390b5 Fix ansible-test target change classification. 2019-04-26 14:14:16 -07:00
Martin Krizek
f8bebc61c8
ansible-test yamllint: fix UnicodeDecodeError (#55364)
* ansible-test yamllint: fix UnicodeDecodeError

* Conditional fix
2019-04-17 09:13:53 +02:00
Jordan Borean
04cae4134f
Bump deps for ntlm-auth and PSScriptAnalyzer (#55269) 2019-04-16 06:43:41 +10:00
Matt Clay
2ef4ba3b4d Fix ansible-test unicode error with redact option. 2019-04-15 11:36:00 -07:00
Matt Clay
a4d0c24bbf
Fix ansible-test inventory and vars path handling. (#55186)
* Fix ansible-test inventory and vars path handling.
* Improve explanation for missing commit.
2019-04-12 11:52:44 -07:00
Matt Clay
5b133f3455 Compat fix for ansible-core-ci on Python 3.7. 2019-04-10 00:37:05 -07:00
Matt Clay
85ae8f5258 Add Hetzner Cloud to CI integration tests. 2019-04-09 15:41:50 -07:00
Rémy Léone
16c4df439a Migrate Scaleway tests to integration tests 2019-04-09 15:41:30 -07:00
Hideki Saito
377fba3d76 Fix handling of inventory and credential options for tower_job_launch (#54967)
- Fixed issue #25017,#37567
- Add example for prompt on launch
- Add integration test for prompt on launch

Signed-off-by: Hideki Saito <saito@fgrep.org>
2019-04-09 14:08:11 +01:00
Matt Clay
a4c42ba687
Update the default test container to 1.7.0. (#54930)
* Update the default test container to 1.7.0.
* Run `pip check` after installing test requirements.
* Support older versions of pip.
* Remove obsolete pip error handler.
2019-04-05 22:34:38 -07:00
Matt Clay
785afc7a53
Improve ansible-test python interpreter selection. (#54445) 2019-03-27 16:40:27 -07:00
Matt Clay
89a022b6a0 Update handling of the non_local test alias.
Previously the alias disabled all code coverage collection.
Now it only disables Ansible module code coverage collection.
2019-03-22 16:05:24 -07:00
Matt Clay
ade6977d66 Fix typo in doc_fragments path. 2019-03-21 15:36:05 -07:00
Jordan Borean
0bf14d61d0
Add PSCustomUseLiteralPath and update PSSA for pslint (#54080) 2019-03-20 16:26:12 +10:00
Matt Clay
63ce588382 Update pylint and split runs more to avoid hangs. 2019-03-19 13:17:37 -07:00
Sloane Hertel
7da565b3ae
parse botocore.endpoint logs into a list of AWS actions (#49312)
* Add an option to parse botocore.endpoint logs for the AWS actions performed during a task

Add a callback to consolidate all AWS actions used by modules

Added some documentation to the AWS guidelines

* Enable aws_resource_actions callback only for AWS tests

* Add script to help generate policies

* Set debug_botocore_endpoint_logs via environment variable for all AWS integration tests

Ensure AWS tests inherit environment

(also remove AWS CLI in aws_rds inventory tests and use the module)
2019-03-18 08:29:03 -05:00
Jordan Borean
c2466c545b
Handle binary files when scanning metadata in python 3 (#53773) 2019-03-14 10:00:30 +10:00
Matt Martz
07ff2a6494 cliconf and httpapi are documentable plugins now 2019-03-13 10:28:44 -07:00
Matt Clay
a8e328f474
Overhaul ansible-test code coverage and injector. (#53510) 2019-03-13 07:14:12 -07:00
Matt Clay
8fa294a33a
Fix ansible-test coverage stub memory usage. (#53652)
Split coverage stub files into multiple parts based on the number
of lines in files included in each stub. This will keep memory usage
down to avoid hanging on Shippable.
2019-03-11 15:14:09 -07:00
Matt Clay
887ab35656
Add support for ansible-test --coverage-check. (#53573) 2019-03-11 15:13:09 -07:00
Matt Clay
6588df505c Improve display of test timeout message. 2019-03-08 22:43:06 -08:00
Matt Clay
8fe9eb7b92 Show invalid coverage paths with verbosity > 1. 2019-03-08 15:47:44 -08:00
Matt Clay
36baf7d83a
Make ansible-test less noisy for change detection. (#53497)
* Make ansible-test less noisy for change detection.
* Set verbosity=2 for dependent file expansion.
2019-03-07 22:50:10 -08:00
Matt Clay
8535c05b29 Add ansible-test finally block after tests run.
This will record data from passing tests even when tests fail.
2019-03-07 18:31:02 -08:00
Jordan Borean
8ef2e6da05 Add support for Windows hosts in the SSH connection plugin (#47732)
* Add support for Windows hosts in the SSH connection plugin

* fix Python 2.6 unit test and sanity issues

* fix up connection tests in CI, disable SCP for now

* ensure we don't pollute the existing environment during the test

* Add connection_windows_ssh to classifier

* use test dir for inventory file

* Required powershell as default shell and fix tests

* Remove exlicit become_methods on connection

* clarify console encoding comment

* ignore recent SCP errors in integration tests

* Add cmd shell type and added more tests

* Fix some doc issues

* revises windows faq

* add anchors for windows links

* revises windows setup page

* Update changelogs/fragments/windows-ssh.yaml

Co-Authored-By: jborean93 <jborean93@gmail.com>
2019-03-07 16:38:02 -08:00
Matt Clay
1c780e79c6 Fix ansible-test junit timeout xml output. 2019-03-07 09:34:46 -08:00
Matt Clay
3d2c0f4973
Fix ansible-test timeout junit output. (#53427)
Fix ansible-test timeout junit output.

Implemented a hack to work around not having junit-xml when running on Shippable outside of our test containers.
2019-03-06 19:46:41 -08:00
Matt Clay
156613f025 Fix coverage handling for non_local tests. 2019-03-06 16:30:37 -08:00
Matt Clay
a8d829d9c3
Add timeout support to ansible-test. (#53302)
* Add timeout support to ansible-test.
* Fix ansible-test tar filename filter bug.
* Update timeouts used on Shippable.
* Kill subprocesses when parent process terminates.
* Require explicit use of env --show option.
2019-03-05 11:58:13 -08:00
Matt Martz
a639dc6d88
Add a new check to ensure that module arguments are valid python identifiers (#53278)
* Add a new check to ensure that module arguments are valid python identifiers

* Move the check up higher, out of the if docs block

* Skip validate-modules on py2

* Remove errant alias
2019-03-05 10:26:06 -06:00
Felix Fontein
1510435577 acme_account: improve account deactivation idempotency (#53234)
* Improve account deactivation idempotency.

* Using newer testing container.

* Add comment to test.
2019-03-05 16:08:01 +00:00
Lukas Kämmerling
66beeaf032 Add hcloud server module (#53062) 2019-03-05 07:30:24 +01:00
Matt Clay
eeaff731de
Overhaul ansible-test cloud test plugins. (#53044) 2019-02-28 18:25:49 -08:00
Matt Clay
861446b2a6 Run network tests when paramiko plugin changes. 2019-02-26 20:47:17 -08:00
Matt Clay
b713246f57 Reduce vcenter integration test boilerplate. 2019-02-26 11:29:21 -08:00
Matt Clay
c9f549e9c1 Fix integration test script coverage reporting.
Code coverage reporting was ignoring scripts executed during integration
tests when those scripts resided in the temporary working directory used
during an integration test run.
2019-02-26 10:21:02 -08:00
Matt Clay
e8a31a12be Use a consistent RLIMIT_NOFILE for ansible-test. 2019-02-18 23:43:37 -08:00
Matt Clay
f5c92f6bc1
Allow setting resource.RLIMIT_NOFILE in modules (#51989) 2019-02-15 17:52:35 -08:00
Dag Wieers
c2fb581414 Fix various sonarcloud issues
This fixes various reported bugs through sonarcloud at:
https://sonarcloud.io/project/issues?id=Rodney-Reis_ansible&resolved=false&types=BUG
2019-02-15 07:19:04 -08:00
Matt Clay
6a82827ddd Add Python 3.8 to ansible-test and CI. 2019-02-14 23:24:24 -08:00
Matt Clay
06d83bae05 Support ignore_changes in code-smell tests. 2019-02-05 15:21:01 -08:00
Jordan Borean
ce8db479f0
ansible-test: make the httptester for Windows more resiliant around the shell chosen (#51416) 2019-01-30 07:50:23 +10:00
Brian Coca
96b3ef5553
Doc fragments to plugins (#50172)
* promote doc_fragments into actual plugins

  change tests hardcoded path to doc fragments
  avoid sanity in fragments
  avoid improper testing of doc_fragments
  also change runner paths
 fix botmeta
 updated comment for fragments
 updated docs
2019-01-23 20:03:47 -05:00
Matt Clay
b834b29e43 Run integration tests from temporary directory.
ci_complete
2019-01-17 17:22:51 -08:00
Matt Clay
6842c0467f Fix ansible-test handling of empty test targets.
Previously empty test targets were ignored by ansible-test.
This would prevent them from participating in dependency analysis.
These targets are actually empty roles, and should be processed as such.
2019-01-16 00:03:43 -08:00
Matt Clay
eee3dc888b Pass ansible-test inventory path to test funcs.
This avoids declaring the inventory path/names in multiple places.
Also expose the inventory path using the INVENTORY_PATH env var.
2019-01-15 18:07:13 -08:00
Matt Clay
4d546398fd
Further cleanup of integration test inventory. (#50919)
* Further cleanup of integration test inventory.
* Preserve aci and msc inventory in template.
* Update ansible-test inventory template handling.
* Fix classification of inventory file.
2019-01-15 16:42:49 -08:00
Matt Clay
6a0452559b Handle non-target file deps for integration tests.
Some integration test targets have dependencies on files outside
the `test/integration/targets/` directory tree. Changes to these
dependencies can result in unexpected test failures since they do
not trigger integration tests which depend on them.
2019-01-14 23:58:10 -08:00
Matt Clay
7b4bc572de
Fix ansible-test target dependency issues. (#50908)
* Log dependencies at verbosity level 4.

This makes it easier to debug target dependency issues.

* Scan symlinks for target dependencies.

Some test targets use symlinks to files in other test targets.
These dependencies were previously undetected. This could result in
changes made to dependencies without triggering the dependent tests.

* Track missing target deps with `needs/target/*`.

Some existing test targets have untracked dependencies on other
test targets. This can result in changes to those dependencies
not triggering their dependent tests, resulting in test failures
after a PR is merged.

This PR adds the appropriate `needs/target/*` aliases to track
those dependencies, along with appropriate processing in
ansible-test to handle the new aliases.

* Scan meta dependencies in script targets.

Script targets are often former role targets which were converted
to allow custom invocations of ansible-playbook. These targets still
have their meta dependencies, but they were not being detected.

This could result in changes to dependencies not triggering the
targets which depend on them.
2019-01-14 19:57:32 -08:00