Commit Graph

91 Commits

Author SHA1 Message Date
dd20427db9 Fix expect for python 3 (#24912)
* Fix expect for python 3

- Change generator next to python 3 compatible
- Added tests for expect

* Add pexpect to integration.txt

- add pexpect library to requirements for integration tests

* Use ansible_python_interpreter in integration tests for expect

* Use double-quotes for expect integration tests

* Cast user input to string for expect integration tests

* Cast user input to string earlier in expect integration tests

* Use ansible.module_utils.six.moves input for expect integration tests

* Fix yamllint errors in the expect test

* Use cat to trigger timeout for expect integration tests

* Use realpath filter in expect integration tests

(cherry picked from commit daada2000c)
2017-06-01 12:14:21 -05:00
3a6fd9448e Limit sphinx version on python 2.6. (#24678)
* Limit sphinx version on python 2.6.
* Fix issues identified by rstcheck.

(cherry picked from commit 9178e176b5)
2017-05-17 01:07:41 +08:00
126878488f Fix bugs in ansible-test units command. (#24044)
* Handle old versions of coverage.
* Handle old versions of setuptools.
* Detect python version for docker/remote units.
* Add sanity override for test constraints.

(cherry picked from commit d662f6f0db)
2017-04-27 11:22:44 +08:00
06be3c56a9 Add rstcheck to ansible-test and correct issues. (#23550)
* Add rstcheck to ansible-test.
* Fix rst code-block languages and syntax errors.
* Fix rst inline literals.
* Update python 2 code block to pass tests on py 3.

(cherry picked from commit cb1f57d4e5)
2017-04-13 13:18:53 -07:00
6883cad07e Temporarily cap pylint version < 1.7.0 in tests.
(cherry picked from commit 4ee96b20a3)
2017-04-13 11:27:30 -07:00
45c2887b19 Fix ansible-test handling of import/syntax errors.
(cherry picked from commit 0cf1e8e061)
2017-04-13 11:27:30 -07:00
92c4a3319c Initial pylint support for ansible-test sanity.
(cherry picked from commit 1daa69d685)
2017-04-13 11:27:30 -07:00
a491adc425 Fix ansible-test empty diff handling on Shippable.
(cherry picked from commit 92ad9a19b6)
2017-04-13 11:27:30 -07:00
7d79105cf4 Overhaul ansible-test import analysis. (#22888)
- Add support for module_utils packages for better organization.
- Add support for "virtual" module_utils packages such as `six`.

(cherry picked from commit 4fdeade389)
2017-03-22 23:02:44 -07:00
0c2c19edb4 Fix metadata handling for shell command. (#22801)
(cherry picked from commit 042e387f27)
2017-03-20 15:32:35 -07:00
5ae1967aea Fix ansible-test base branch handling on merge. (#22759)
(cherry picked from commit 991bf0a1c3)
2017-03-17 23:34:27 -07:00
0ca10bf3d5 Fix ansible-test base branch usage on Shippable.
(cherry picked from commit 47887a2edd)
2017-03-17 17:36:16 -07:00
dc8ad50eaa Fix ansible-test PR diff handling.
Permits use of PRs on branches other than devel.

(cherry picked from commit f7c83ccdc0)
2017-03-16 10:37:10 -07:00
c72ac9b230 Add test verification to ansible-test. (#22636)
* Add unified git diff parser.
* Add metadata and diff handling.
* Add test confidence/verification to bot output.

(cherry picked from commit 869449e288)
2017-03-15 14:48:53 -07:00
c9ea993c88 Verify SHA in Shippable change detection.
(cherry picked from commit 5e9a2b8528)
2017-03-15 11:32:41 -07:00
89559f78de Add --failure-ok option to ansible-test. (#22623) 2017-03-14 16:32:21 -07:00
771b14acb2 Sort test messages for deterministic output. (#22581) 2017-03-13 20:45:10 -07:00
cfd313bced Disable ansible color output on sanity tests. 2017-03-08 12:18:16 -08:00
3ab344e8bd Use lint/junit output for compile test. (#22395)
* Refactor sanity classes for use in all tests.
* Use lint/junit output for compile test.
* Add missing options for compile test.
* Fix early bailout on requirements install.
2017-03-08 00:47:21 -08:00
fbf55886ba Use lint friendly output for python syntax checks. (#22390) 2017-03-07 20:27:50 -08:00
8f463fcdd2 Create bot friendly sanity output. (#22381) 2017-03-07 14:59:50 -08:00
3e4be156d7 Pre-compile regexes to speed up target processing.
Without this, changing a large number of files results in target
processing taking a very long time due to repeatedly compiling
the same patterns in a loop over many targets.
2017-03-06 12:35:12 -08:00
d66ce40ecb Overhaul ansible-test sanity implementation. (#22177)
- Tests are run to completion instead of stopping on first failure.
- Test results are now parsed instead of passing through to the console.
- Test results can be saved in junit xml format.
- Test results will show up on the Shippable "Tests" result tab.
- Added an experimental --lint option for easier integration with other tools.
- Code smell tests are now usable with the --list-tests, --test and --skip-test options.
- Code split out from executor.py into sanity.py.
- Rename download-logs to download.py and add support for test and coverage results.
- Miscellaneous improvements.
2017-03-02 12:36:46 -08:00
28b882e737 Support ansible commands in sanity tests. (#22172) 2017-03-01 15:48:14 -08:00
4f3dade266 Add retries for ansible-test docker run. 2017-02-27 22:55:46 -08:00
45cec93e99 Disable newer shellcheck tests which don't pass. 2017-02-27 22:31:47 -08:00
a7bb04800d Add boto to units requirements for s3 test. 2017-02-27 20:55:32 -08:00
fcac261eef Run unit tests in isolation w/ coverage support. 2017-02-27 17:16:45 -08:00
c87ebb6215 Deduplicate arcs when combining coverage data. (#22022) 2017-02-27 15:46:15 -08:00
2797cff773 Run destructive win tests when creating instances. 2017-02-27 10:36:53 -08:00
2804d2e848 Split up unit tests on Shippable. (#21931)
* Add more verbose output to coverage combine.
* Run unit tests on CI separately by version.
2017-02-24 16:58:56 -08:00
bc8186543a Pass base branch to module validator on delegate. 2017-02-20 14:28:11 -08:00
9b1bd2eb7e Re-enable module comparisons in validate-modules (#21582)
* Re-enable module comparisons, specifically for new module detection and for finding new options/arguments
* Only do new module checks in shippable, local will display warning
2017-02-17 15:13:18 -08:00
1ce2ea0b6c Fix ansible-test handling of deleted test targets. 2017-02-17 11:16:24 -08:00
2192c1eb02 Fix ansible-test selection of inventory file. 2017-02-16 15:03:27 -08:00
5e28d3a15c network_cli shouldn't be specified anymore (#21458) 2017-02-15 12:58:12 +00:00
d54bc09fae Consider module_utils deps when running tests. (#21382)
* Skip pep8 analysis when --explain is used.
* Fix return type annotations.
* Match line length requirement of PEP 8 config.
* Consider module_utils deps when running tests.
2017-02-13 18:49:36 -08:00
7f1c43e597 updates ios modules to support persistent socket (#21258)
* updates all ios modules to support persistent socket
* adds ios action plugin to connect to device
* adds exec_command() to ios shared module
* fixes ios_config and ios_template local action
* update all unit test cases
* adds base test module for ios module testing
2017-02-13 15:22:14 +00:00
4189592701 Revert "Enable process isolation for unit tests."
This reverts commit 91526cd9f2.

Removing this feature primarily because it interferes with
collecting proper code coverage results. I may restore the
feature later if that can be resolved.
2017-02-09 11:10:06 -08:00
91526cd9f2 Enable process isolation for unit tests. 2017-02-08 14:36:42 -08:00
f16ee2841b Add retries to Shippable CI scripts. (#21108)
* Add retry.py for auto-retry in CI scripts.
* Add retries to other and units CI scripts.
2017-02-07 16:33:45 -08:00
bce5fc7d96 Use us-east-2 for Windows CI on Shippable. 2017-02-06 15:01:20 -08:00
309a37de86 Add --debug option to ansible-test. 2017-02-01 16:05:03 -08:00
1609afbd12 Unittests for some of module_common.py (#20812)
* Unittests for some of module_common.py
* Port test_run_command to use pytest-mock

The use of addCleanup(patch.stopall) from the unittest idiom was
conflicting with the pytest-mock idiom of closing all patches
automatically.  Switching to pytest-mock ensures that the patches are
closed and removing the stopall stops the conflict.
2017-01-30 13:51:27 -08:00
6ef1a6aeb6 Add pep8 to ansible-test. (#20745)
The rule sets and legacy file list are a first draft.
It is likely that they will need to be revised.
2017-01-27 12:34:00 -08:00
3a0a74dc18 Make test/runner less verbose when spawning instances
As discussed on IRC
2017-01-27 12:27:46 -08:00
5503b89831 Run fewer tests for winrm config script changes. 2017-01-26 15:54:01 -08:00
76d563af79 Temporarily switch Windows tests to us-east-1.
Will switch back to us-east-2 after AWS limit increase is done.
2017-01-26 07:37:14 -08:00
fa7f84217b Add startup checks to ansible-test. 2017-01-24 13:08:04 -08:00
61e6e7868c Improve jinja2 test coverage. (#20533)
* Run `template` test on latest jinja2 version.
* Update jinja2 install for groupby_filter.
* Clean test output dir for each test.
2017-01-20 16:38:52 -08:00