Commit graph

203 commits

Author SHA1 Message Date
Jordan Borean
665d838fc2 added optional environment passthrough for MacOS 10.13 compatibility (#31500) 2017-10-10 08:41:06 +10:00
Matt Clay
a333f2e5b0 Fix ansible-test config management. 2017-10-04 12:52:36 -07:00
Matt Clay
c055795e02 Pin docker simulator versions. 2017-10-02 13:19:17 -07:00
Matt Clay
ab89b1b219 Add region to ansible-test AWS cloud config. (#30733)
* Add region to ansible-test AWS cloud config.
* Fix .gitignore for ansible-test cloud config.
2017-09-22 00:19:21 -07:00
Matt Clay
397918435b Fix docker error handling for cs/vcenter tests. 2017-09-15 16:49:46 -07:00
Matt Clay
781fd7099a Reorganize integration tests:
- Move legacy tests into a separate directory.
- Reduce common dependencies between targets.
2017-09-14 07:14:30 -07:00
Matt Clay
1a602096f5 Improve ansible-test HttpClient error handling. (#30301)
- Automatic retries on DNS lookup failures.
- Handle API errors in shippable.py.
2017-09-13 12:23:48 -07:00
Matt Clay
79bc49e150 Fix ansible-test unicode and sanity tests. (#29743)
* Show warning when using pylint on Python 2.6.
* Add pylint disable entries for Python 2.
* Fix unicode handling in ansible-test.
* Add missing documentation.
2017-09-11 16:39:34 -07:00
Matt Clay
f88750d665 Expand disabled pylint rules. (#29162)
* Expand disabled pylint rules.
* Fix pylint and unicode issues in ansible-test.
2017-09-09 08:59:09 -07:00
Matt Clay
a1453a7917 Improve handling of first CI run for new branch. (#29070) 2017-09-06 16:40:04 -07:00
Matt Clay
8f4c8844c4 Divide Windows integration tests into 2 groups. (#29029)
* Divide Windows integration tests into 2 groups.
* Support `none` for `--changed-all-target`.
* Run 2 separate Windows groups on Shippable.
* Only run smoketest and minimal for the group1 job.
2017-09-05 15:32:26 -07:00
Matt Clay
79dcb3a3fa Add help links to bot messages. (#28903) 2017-08-31 16:39:37 -07:00
Matt Clay
bda0f6e241 Fix ansible-test handling of integration dir. 2017-08-30 11:37:14 -07:00
Matt Clay
f71d861563 Collect data from integration test runs. (#28650) 2017-08-25 18:14:47 -04:00
Matt Clay
5ea8a5e34b Add support for setup targets to ansible-test. (#28544)
* Add support for setup targets to ansible-test.
* Code cleanup.
2017-08-23 14:09:50 -04:00
Matt Clay
688823014f Convert sanity tests to plugins. (#28425)
* Move sanity into directory.
* Omit abstract classes from returned subclass list.
* Split sanity tests out into plugins.
* Fix abstract class handling for Python 3.
2017-08-18 17:21:11 -07:00
Matt Clay
a31f4c178a Fix pep8/pylint tests when deleting files. (#28410)
* Fix pep8/pylint tests when deleting files.
* Improve static analysis in PyCharm.
* Use success instead of skipped for explain.
2017-08-18 11:21:53 -07:00
Matt Clay
8e0b5800b7 Miscellaneous ansible-test fixes. (#28355)
* Include .github in test targets. Fix BOTMETA.yml.
* Include bin in compile tests.
* Exclude links from test targets.
* Include bin in pep8 and pylint tests.
* Fix pep8 and pylint issues in bin dir.
2017-08-17 12:04:43 -07:00
Matt Clay
66fa46fdda Update ansible-test change classification. (#28345) 2017-08-17 10:25:33 -07:00
Ricardo Carrillo Cruz
746b433c29 Remove 'net' hardcoding on ansible-test executor (#28334)
We need to run network-integration against platform agnostic modules,
which they all are named as net_* .
There is a hardcoding in executor where if prefix is 'net' the hosts is set
to all, removing these lines to have desired behaviour.
2017-08-17 18:15:59 +02:00
Matt Clay
0ff5815a4f Fix ansible-test target completion on Python 3. 2017-08-15 16:18:02 -07:00
Brian Coca
f921369445 Ansible Config part2 (#27448)
* Ansible Config part2

- made dump_me nicer, added note this is not prod
- moved internal key removal function to vars
- carry tracebacks in errors we can now show tracebacks for plugins on vvv
- show inventory plugin tracebacks on vvv
- minor fixes to cg groups plugin
- draft config from plugin docs
- made search path warning 'saner' (top level dirs only)
- correctly display config entries and others
- removed unneeded code
- commented out some conn plugin specific from base.yml
- also deprecated sudo/su
- updated ssh conn docs
- shared get option method for connection plugins
- note about needing eval for defaults
- tailored yaml ext
- updated strategy entry
- for connection pliugins, options load on plugin load
- allow for long types in definitions
- better display in ansible-doc
- cleaned up/updated source docs and base.yml
- added many descriptions
- deprecated include toggles as include is
- draft backwards compat get_config
- fixes to ansible-config, added --only-changed
- some code reoorg
- small license headers
- show default in doc type
- pushed module utils details to 5vs
- work w/o config file
- PEPE ATE!
- moved loader to it's own file
- fixed rhn_register test
- fixed boto requirement in make tests
- I ate Pepe
- fixed dynamic eval of defaults
- better doc code

skip ipaddr filter tests when missing netaddr
removed devnull string from config
better becoem resolution

* killed extra space with extreeme prejudice

cause its an affront against all that is holy that 2 spaces touch each other!

shippable timing out on some images, but merging as it passes most
2017-08-15 16:38:59 -04:00
Matt Clay
caf8bbf3bd Add Azure support to ansible-test. (#28092)
* Initial Azure cloud testing support.
* Add missing Azure requirements.
* Fix test handling of setup and requirements.
* Update Azure cloud plugin.
* Add setup_azure role for integration tests.
* Update minimal Azure integration test sample.
2017-08-11 17:33:39 -07:00
Matt Clay
5b6321e45d Update ansible-test handling of setup.py changes. 2017-08-11 14:08:22 -07:00
Matt Clay
869e90e12a Don't fail coverage reporting due to parse errors. 2017-08-10 15:36:47 -07:00
Matt Clay
a40cb5a47f Miscellaneous ansible-test updates. (#27937)
* Add keep alives to ansible-test ssh delegation.
* Improve ansible-test JSON parsing error messages.
* Increase ansible-test delegation sleep and retry.
* Update ansible-test to recognize .psm1 files.
2017-08-08 22:55:17 -07:00
Dag Wieers
941738a686 ansible-test: Fix environments with LD_LIBRARY_PATH 2017-08-04 13:53:52 -07:00
Toshio Kuratomi
21564cdb98 Add some features to the pylint sanity check
* Enable specific tests (this lets us disable a group and then
  enable a particular test inside of it)
* Comment out tests in the enable and disable files
2017-07-29 14:13:30 -07:00
Matt Clay
f6d7fc548e Fix ansible-test type hints. 2017-07-28 21:47:04 -07:00
Matt Clay
e241e15899 Add support for non_local alias in ansible-test. 2017-07-28 12:24:55 -07:00
Matt Clay
87d434ed68 Fix ansible-test handling of git output. 2017-07-27 18:26:23 -07:00
Matt Clay
51bd07204b Revert "Revert "Allow ini plugin to load file using other encoding than utf8." (#27407)"
This reverts commit 520696fb39.
2017-07-27 18:15:56 -07:00
Toshio Kuratomi
520696fb39 Revert "Allow ini plugin to load file using other encoding than utf8." (#27407)
* Revert "Update conventions in azure modules"

This reverts commit 30a688d8d3.

* Revert "Allow specific __future__ imports in modules"

This reverts commit 3a2670e0fd.

* Revert "Fix wildcard import in galaxy/token.py"

This reverts commit 6456891053.

* Revert "Fix one name in module error due to rewritten VariableManager"

This reverts commit 87a192fe66.

* Revert "Disable pylint check for names existing in modules for test data"

This reverts commit 6ac683ca19.

* Revert "Allow ini plugin to load file using other encoding than utf8."

This reverts commit 6a57ad34c0.
2017-07-27 17:08:31 -07:00
Yannig Perré
6a57ad34c0 Allow ini plugin to load file using other encoding than utf8.
- New option for ini plugins: encoding
  - Add a new option encoding to _get_file_contents
  - Use replace option in test/runner/lib/util.py when calling decode on stdout/err
    output when diff have non-utf8 sequences
2017-07-27 14:20:18 -07:00
John R Barker
72bfb051c3 Allow ansible.cfg overrides (#27372)
If a cfg file exists for this this command then use it.
This allows versioned test configuration to override the built in
Ansible constants.
2017-07-27 11:37:15 +01:00
Toshio Kuratomi
9f7b0dfc30 Remove automatic use of system six
* Enable the pylint no-name-in-module check.  Checks that identifiers in
  imports actually exist.  When we do this, we also have to ignore
  _MovedItems used in our bundled six.  This means pylint won't check
  for bad imports below ansible.module_utils.six.moves but that's
  something that pylint punts on with a system copy of six so this is
  still an improvement.
* Remove automatic use of system six.  The exec in the six code which
  tried to use a system library if available destroyed pylint's ability
  to check for imports of identifiers which did not exist (the
  no-name-in-module check).  That test is important enough that we
  should sacrifice the bundling detection in favour of the test.
  Distributions that want to unbundle six can replace the bundled six in
  ansible/module_utils/six/__init__.py to unbundle.  however, be aware
  that six is tricky to unbundle.  They may want to base their efforts
  off the code we were using:

  2fff690caa/lib/ansible/module_utils/six/__init__.py

* Update tests for new location of bundled six Several code-smell tests
  whitelist the bundled six library.  Update the path to the library so
  that they work.

* Also check for basestring in modules as the enabled pylint tests will
  also point out basestring usage for us.
2017-07-25 15:58:23 -07:00
Matt Clay
27033915cc Add --list-targets and speed up --explain. (#26838)
* Add ansible-test --list-targets option.
* Speed up ansible-test integration --explain.
2017-07-14 19:11:25 -07:00
Matt Clay
e63f69464f Add ansible-test options and docs. (#26823)
* All integration commands support --continue-on-error
* The network-integration command supports --inventory
* Add landing page for compile test docs.
* Add bot documentation links.
2017-07-14 16:52:11 -07:00
Matt Clay
7931e11437 Use subset of Windows tests for "all" tests. (#26830) 2017-07-14 16:51:32 -07:00
Matt Clay
789218c215 Initial ansible-test sanity docs. (#26775)
* Rename no-iterkeys test for consistency.

* Require docs for all ansible-test sanity tests.

* Initial ansible-test sanity docs.

* Fix capitalization of Python.

* Fix sanity code smell test false positives.

* Fix another code-smell false positive.
2017-07-14 14:24:45 +01:00
Pilou
4b3d6dfa8a Use pycodestyle instead of pep8 (#25947) 2017-07-13 11:46:31 -07:00
Matt Clay
fad469efca Ignore platform_agnostic.yaml in ansible-test. 2017-07-13 11:23:59 -07:00
Matt Clay
0b784c65b1 Add sanity import test to ansible-test. (#26730)
* Add sanity import test to ansible-test.
* Run sanity import test on all python versions.
2017-07-12 20:04:22 -07:00
Matt Clay
20d49af475 Add ANSIBLE_TEST_CI env var to integration tests. 2017-07-12 17:46:12 -07:00
Matt Clay
ab5dd24430 Handle pip/python errors in ansible-test better. 2017-07-11 16:37:16 -07:00
Matt Clay
82558baaf6 Add role dependencies to change classification. 2017-07-10 18:20:09 -07:00
Matt Clay
4a013d6d69 Add RHEL 7.3 to ansible-test and CI. (#26550)
* Add support for RHEL to ansible-test.
* Enable RHEL 7.3 on Shippable.
2017-07-07 16:52:40 -07:00
David Newswanger
294c0f91c0 added option to ansible-test to run test playbooks using the debug strategy (#26499) 2017-07-07 12:37:08 -07:00
Matt Clay
a94156227d Improve error handling for cs tests. 2017-07-06 17:55:51 -07:00
Matt Clay
45e377566c Refactor ansible-test config classes. (#26505)
* Move Config classes from executor.py to config.py.
* Move Environment and Test config to config.py.
* Move Coverage/CoverageReport Config to config.py.
* Clean up type hints.
2017-07-06 16:14:44 -07:00
Matt Clay
bd8ea89b1b Improve handling of network test changes. 2017-07-06 14:25:58 -07:00
Matt Clay
c26a556929 Add check for known_hosts changing during tests. (#26470)
* Add check for known_hosts changing during tests.
* Don't use known hosts file for delegate_to test.
2017-07-06 00:47:28 -07:00
Matt Clay
fba76444e0 Add ansible-test coverage report --show-missing. 2017-07-05 17:11:41 -07:00
David Newswanger
0a6dcf4169 changed ansible-test so that it replaces . with - instead of . with _ so that the hostname is valid 2017-07-03 20:11:50 -07:00
Matt Clay
cd3a795e65 Permissions fix for remote coverage downloads. 2017-07-02 14:09:16 -07:00
Matt Clay
554423cf04 Expose docker socket to test containers. 2017-06-30 16:46:41 -07:00
René Moser
77d0542985 test, integration: add diff support (#26296) 2017-06-30 20:43:34 +02:00
Pierre-Louis Bonicoli
d08ff86169 ansible-test: pass --[skip-]tags to ansible-playbook
Thanks to Olaf Klischat for the idea.
2017-06-30 10:35:39 -07:00
Matt Clay
e56ea435f0 Skip dependency check for deleted files. (#26112) 2017-06-26 11:48:46 -07:00
David Newswanger
b2d88f8b73 updated ansible-test integration to skip any files in test/integration/targets/ that aren't directories.
Fixes #26007
2017-06-22 13:03:42 -07:00
jctanner
996dcb989c Add the cloud provider script for the vcenter simulator container (#25964) 2017-06-22 10:49:58 -07:00
Matt Clay
53180ebb57 Fix Shippable BASE_BRANCH lookup on merges. 2017-05-19 01:51:24 +08:00
Matt Clay
5babe2daea Increase python version coverage for tests. (#24762)
* Improve ansible-test inventory handling.
* Fix python 3 re-raise of exception from thread.
* Fix python 3 encoding for windows-integration.
* Run network tests on multiple python versions.
* Run windows tests on multiple python versions.
* Support Shippable delegation using --tox.
* Skip vyos_command on python 3 tests until fixed.
* Add python 3 filtering to local and tox.
* Fix tests to support back to back runs.
* Temporarily test networking with python 2.7 only.

Running the tests back to back causes intermittent test failures
which need to be addressed before we can test multiple versions
in a single test run.
2017-05-19 01:37:53 +08:00
Matt Clay
4daa16f9ce Add --all and --stub coverage options.
ci_coverage
ci_complete
2017-05-16 12:02:03 +08:00
Matt Clay
6a2a7a2392 Enable codecov.io and add coverage grouping. 2017-05-15 19:14:05 +08:00
Matt Clay
fdcad0f44d Improve on-demand coverage for Shippable. 2017-05-14 18:27:58 +08:00
John R Barker
e9e2d67035 Run vyos_command Network tests in Shippable (#24514)
* Run VyOS Network tests in Shippable

* net_command no longer exists

* network/ci

* Disable other network tests

* pep8 fix

* Fix PEP 8 issue.
2017-05-12 12:49:12 +01:00
Matt Clay
dfd19a812f Miscellaneous bug fixes for ansible-test.
- Overhauled coverage injector to fix issues with non-local tests.
- Updated integration tests to work with the new coverage injector.
- Fix concurrency issue by using random temp files for delegation.
- Fix handling of coverage files from root user.
- Fix handling of coverage files without arcs.
- Make sure temp copy of injector is world readable and executable.
2017-05-12 14:55:48 +08:00
Matt Clay
fb9efd3c7e Add --remote-terminate option to ansible-test.
Set `--remote-terminate success` for osx tests.
2017-05-11 22:42:52 +08:00
Matt Clay
b8cb3f519b Detect and fix environment tampering in tests. 2017-05-11 19:45:15 +08:00
Matt Clay
e6934e42be Update ansible-test change handling and CS plugin. (#24395)
* Use CloudStack simulator from Ansible repo.
* Recognize cloud specific ansible-test changes.
* Hide ansible-test cs notice in explain mode.
2017-05-09 16:15:27 +08:00
Matt Clay
0573b8bcd2 Fix ansible-test cloud integration bugs. 2017-05-05 21:46:29 +08:00
Matt Clay
ac72fd9d2c Add missing return statements. 2017-05-05 18:37:11 +08:00
Matt Clay
201242f302 Fix call to wrong method in ansible-test. 2017-05-05 18:18:40 +08:00
Matt Clay
1582e9bf7d Fix handling of Shippable env vars. 2017-05-05 17:44:51 +08:00
Matt Clay
a07d42e16d Add support for cloud tests to ansible-test. (#24315)
* Split out ansible-test docker functions.
* Add cloud support to ansible-test.
2017-05-05 16:23:00 +08:00
Matt Clay
6522d703a1 Fix ansible-test pylint and pep8 issues. (#24245)
* Fix pylint useless-super-delegation issues.
* Fix miscellaneous pylint issues.
* Fix PEP 8 issues.
* Fix warnings reported by PyCharm.
2017-05-03 23:19:44 +08:00
Matt Clay
d662f6f0db 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.
2017-04-27 11:21:11 +08:00
Matt Clay
cb1f57d4e5 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.
2017-04-13 10:28:52 -07:00
Matt Clay
92ad9a19b6 Fix ansible-test empty diff handling on Shippable. 2017-04-08 22:08:08 -07:00
Matt Clay
0cf1e8e061 Fix ansible-test handling of import/syntax errors. 2017-04-07 12:20:31 -07:00
Matt Clay
1daa69d685 Initial pylint support for ansible-test sanity. 2017-04-04 16:16:21 -07:00
Matt Clay
4fdeade389 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`.
2017-03-22 18:07:53 -07:00
Matt Clay
042e387f27 Fix metadata handling for shell command. (#22801) 2017-03-20 15:31:57 -07:00
Matt Clay
991bf0a1c3 Fix ansible-test base branch handling on merge. (#22759) 2017-03-17 23:33:32 -07:00
Matt Clay
47887a2edd Fix ansible-test base branch usage on Shippable. 2017-03-17 17:35:09 -07:00
Matt Clay
f7c83ccdc0 Fix ansible-test PR diff handling.
Permits use of PRs on branches other than devel.
2017-03-16 10:34:31 -07:00
Matt Clay
3a22467b38 Remove python 2.4 compile test. 2017-03-15 15:46:12 -07:00
Matt Clay
869449e288 Add test verification to ansible-test. (#22636)
* Add unified git diff parser.
* Add metadata and diff handling.
* Add test confidence/verification to bot output.
2017-03-15 12:17:42 -07:00
Matt Clay
5e9a2b8528 Verify SHA in Shippable change detection. 2017-03-15 11:31:55 -07:00
Matt Clay
89559f78de Add --failure-ok option to ansible-test. (#22623) 2017-03-14 16:32:21 -07:00
Matt Clay
771b14acb2 Sort test messages for deterministic output. (#22581) 2017-03-13 20:45:10 -07:00
Matt Clay
cfd313bced Disable ansible color output on sanity tests. 2017-03-08 12:18:16 -08:00
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.
2017-03-08 00:47:21 -08:00
Matt Clay
fbf55886ba Use lint friendly output for python syntax checks. (#22390) 2017-03-07 20:27:50 -08:00
Matt Clay
8f463fcdd2 Create bot friendly sanity output. (#22381) 2017-03-07 14:59:50 -08:00
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.
2017-03-06 12:35:12 -08:00
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.
2017-03-02 12:36:46 -08:00
Matt Clay
28b882e737 Support ansible commands in sanity tests. (#22172) 2017-03-01 15:48:14 -08:00
Matt Clay
4f3dade266 Add retries for ansible-test docker run. 2017-02-27 22:55:46 -08:00