Commit Graph

91 Commits (121941635d87f00a3d39c773fcdb0eea5d18cbc5)

Author SHA1 Message Date
kkjang 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)
9 years ago
Matt Clay 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)
9 years ago
Matt Clay 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)
9 years ago
Matt Clay 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)
9 years ago
Matt Clay 6883cad07e Temporarily cap pylint version < 1.7.0 in tests.
(cherry picked from commit 4ee96b20a3)
9 years ago
Matt Clay 45c2887b19 Fix ansible-test handling of import/syntax errors.
(cherry picked from commit 0cf1e8e061)
9 years ago
Matt Clay 92c4a3319c Initial pylint support for ansible-test sanity.
(cherry picked from commit 1daa69d685)
9 years ago
Matt Clay a491adc425 Fix ansible-test empty diff handling on Shippable.
(cherry picked from commit 92ad9a19b6)
9 years ago
Matt Clay 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)
9 years ago
Matt Clay 0c2c19edb4 Fix metadata handling for shell command. (#22801)
(cherry picked from commit 042e387f27)
9 years ago
Matt Clay 5ae1967aea Fix ansible-test base branch handling on merge. (#22759)
(cherry picked from commit 991bf0a1c3)
9 years ago
Matt Clay 0ca10bf3d5 Fix ansible-test base branch usage on Shippable.
(cherry picked from commit 47887a2edd)
9 years ago
Matt Clay dc8ad50eaa Fix ansible-test PR diff handling.
Permits use of PRs on branches other than devel.

(cherry picked from commit f7c83ccdc0)
9 years ago
Matt Clay 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)
9 years ago
Matt Clay c9ea993c88 Verify SHA in Shippable change detection.
(cherry picked from commit 5e9a2b8528)
9 years ago
Matt Clay 89559f78de Add `--failure-ok` option to `ansible-test`. (#22623) 9 years ago
Matt Clay 771b14acb2 Sort test messages for deterministic output. (#22581) 9 years ago
Matt Clay cfd313bced Disable ansible color output on sanity tests. 9 years ago
Matt Clay 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.
9 years ago
Matt Clay fbf55886ba Use lint friendly output for python syntax checks. (#22390) 9 years ago
Matt Clay 8f463fcdd2 Create bot friendly sanity output. (#22381) 9 years ago
Matt Clay 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.
9 years ago
Matt Clay 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.
9 years ago
Matt Clay 28b882e737 Support ansible commands in sanity tests. (#22172) 9 years ago
Matt Clay 4f3dade266 Add retries for ansible-test docker run. 9 years ago
Matt Clay 45cec93e99 Disable newer shellcheck tests which don't pass. 9 years ago
Matt Clay a7bb04800d Add boto to units requirements for s3 test. 9 years ago
Matt Clay fcac261eef Run unit tests in isolation w/ coverage support. 9 years ago
Matt Clay c87ebb6215 Deduplicate arcs when combining coverage data. (#22022) 9 years ago
Matt Clay 2797cff773 Run destructive win tests when creating instances. 9 years ago
Matt Clay 2804d2e848 Split up unit tests on Shippable. (#21931)
* Add more verbose output to coverage combine.
* Run unit tests on CI separately by version.
9 years ago
Matt Clay bc8186543a Pass base branch to module validator on delegate. 9 years ago
Matt Martz 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
9 years ago
Matt Clay 1ce2ea0b6c Fix ansible-test handling of deleted test targets. 9 years ago
Matt Clay 2192c1eb02 Fix ansible-test selection of inventory file. 9 years ago
John R Barker 5e28d3a15c network_cli shouldn't be specified anymore (#21458) 9 years ago
Matt Clay 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.
9 years ago
Peter Sprygada 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
9 years ago
Matt Clay 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.
9 years ago
Matt Clay 91526cd9f2 Enable process isolation for unit tests. 9 years ago
Matt Clay 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.
9 years ago
Matt Clay bce5fc7d96 Use us-east-2 for Windows CI on Shippable. 9 years ago
Matt Clay 309a37de86 Add `--debug` option to `ansible-test`. 9 years ago
Toshio Kuratomi 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.
9 years ago
Matt Clay 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.
9 years ago
Dag Wieers 3a0a74dc18 Make test/runner less verbose when spawning instances
As discussed on IRC
9 years ago
Matt Clay 5503b89831 Run fewer tests for winrm config script changes. 9 years ago
Matt Clay 76d563af79 Temporarily switch Windows tests to us-east-1.
Will switch back to us-east-2 after AWS limit increase is done.
9 years ago
Matt Clay fa7f84217b Add startup checks to ansible-test. 9 years ago
Matt Clay 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.
9 years ago