Commit graph

165 commits

Author SHA1 Message Date
Michael Scherer
578da9a615 Enable test for lookups on python 3
Since passlib algo sometime takes a bytes, and sometime
not, depending on a internal variable, we have to convert
bnased on it, or it fail with "TypeError: salt must be bytes,
not str" (or unicode instead of bytes)

However, that's not great to use internal structure for that.
2016-10-20 13:22:59 -07:00
Michael Scherer
e93a8814a3 Let authorized_keys be tested on python 3 2016-10-20 10:29:14 -07:00
Toshio Kuratomi
60acfd1e87 Fix ansible-pull on python3
On python3, we can't write bytes directly to sys.stdout.
2016-10-17 16:31:08 -07:00
Toshio Kuratomi
fd14048d46 Thanks to mscherer, these tests are now passing 2016-10-17 15:39:30 -07:00
Toshio Kuratomi
91c1fdec3d unarchive tests now pass on python3 2016-10-15 08:50:13 -07:00
John R Barker
0ef3ff6a9d Install dependencies for validate-modules (#18028)
Currently (pre-repomerge) we aren't running sanity.sh from
ansible/ansible, after the merge we will. Therefore I've added the
requirements here, rather than in ansible-modules-*/test/utils/shippable
2016-10-14 12:23:29 +01:00
Matt Clay
656b82417e Fix role path for generate-tests. 2016-10-13 13:04:48 -07:00
Matt Clay
80a5c70ad7 Split integration tests out from Makefile. (#17976) 2016-10-12 14:57:53 -07:00
Toshio Kuratomi
5bc3cb278c Remove unicode escape (#17866)
* Remove unicode-escape which is not present on python3

Alternative fix for #17305

* Enable the assemble test on python3

* Fix other problems with assemble on python3
2016-10-02 22:12:51 -07:00
Matt Clay
21857e8618 Disable privileged mode on Shippable. (#17844) 2016-09-30 22:06:28 -07:00
Toshio Kuratomi
4452ee86bd Turn mount test back on (#17797)
* Turn mount test back on

* Mount tests need PRIVILEGED so turn that back on

Revert "Revert "Set PRIVILEGED=true for non_destructive tests. (#17733)" (#17738)"

This reverts commit dc0fb1c212.

* Add a needs_privileged tag so that we can skip mount tests on centos6

Some containers timeout on shippable tests when run with privileged.
Unfortunately, some tests require that in order to run.  Tagging those
allows us to skip those tests on the platforms that timeout when we get
ready to run the integration test in shippable.

* Centos6 times out with PRIVILEGED set so remove that (will disable the mount tests on centos6)

* Remove false start
2016-09-28 10:52:33 -07:00
Matt Clay
a265d2d77d Run test_template tests on OS X. (#17791) 2016-09-27 23:30:58 -07:00
Matt Clay
0dc3db9e75 Enable unarchive tests for OS X and FreeBSD. (#17789) 2016-09-27 21:37:24 -07:00
Matt Clay
d05df5fc61 Disable expect continue in ansible-core-ci. (#17737)
This will allow use of larger SSH keys.
2016-09-23 22:09:46 -07:00
Matt Clay
2e0bec293c Improve error handling for ansible-core-ci. (#17734) 2016-09-23 14:42:47 -07:00
Matt Clay
cf4d436e07 Remove run_tests.sh and update docs. (#17719)
Removed the obsolete test/utils/run_tests.sh script in favor of
using the newer test/utils/shippable/integration.sh instead.
2016-09-22 23:51:53 -07:00
Matt Clay
50b0d011fe Update integration.sh to copy source by default. (#17717)
Also add more documentation to the script.
2016-09-22 22:28:55 -07:00
Matt Clay
40ffd8269d Add shellcheck to code-smell checks. (#17715) 2016-09-22 16:12:10 -07:00
Adrian Likins
e11f7d2339 add a defaults for integration.sh (#17709)
* add a default test image (ansible/ansible:centos7)
* add a default test target (all)
2016-09-22 13:25:04 -07:00
Matt Clay
ada2432165 Add keep on failure option to integration.sh. (#17711) 2016-09-22 12:42:55 -07:00
Matt Clay
7b3cbafbe9 Add python 3 awareness to apt module tests. (#17574)
Also remove unnecessary dependency from ubuntu1604py3 Dockerfile.
2016-09-14 15:38:27 -07:00
Matt Clay
bcb49fecb5 Add tool for downloading Shippable logs. 2016-09-14 15:30:46 -07:00
Allen Sanabria
b510abce17 CloudRetry/AWSRetry backoff decorator with unit tests (#17039)
* Added aws_retry decorator function with unit tests

* Restructured the code to be used with a base class.

This base class CloudRetry can be reused by any other cloud provider.
This decorator should be used in situations, where you need to implement
a backoff algorithm and want to retry based on the status code from the
exception.

* updated documentation

* fixed tabs

* added botocore and boto3 to requirements.txt

* removed cloud.py from py24 tests, as it depends on boto3

* fix relative imports

* updated test to be 2.6 compat

* updated method name from retry to backoff

* readded lxd

* Updated default backoff from 2 seconds to 1.1s.

This will be about a total of 48 seconds in 10 tries. This is
configurable.
2016-09-13 16:46:59 -04:00
Matt Clay
c81fe70fbf Enable more integration tests for python 3. (#17473)
* Enable more integration tests for python 3.
* Split out python 3 integration tests.

Now that we're running more integration tests on python 3, the
tests are taking long enough that they warrant splitting out in
the same way the python 2 tests are split.
2016-09-08 18:55:15 -07:00
Matt Clay
a1947401ba Enable more tests that pass on python 3. (#17471)
* Enable more tests that pass on python 3.
* Disable test_apt_repository for python 3.
2016-09-08 17:19:06 -07:00
Matt Clay
eb26616b09 Add python3-apt to ubuntu1604py3 Dockerfile. 2016-09-08 16:11:30 -07:00
Matt Clay
7cd988f60c Enable more integration tests for python 3. (#17375)
The test_async test target was updated to accommodate changes in
output buffering behavior in python 3. This change in behavior
may need to be addressed in the future.
2016-09-02 23:14:44 -07:00
Toshio Kuratomi
f7b22a5eaa Fix paramiko's exec_command() to return bytes on python3 (#17372)
* Fix paramiko's exec_command() to return bytes on python3

* Run test_connection for python3 now too

* Fix atomic_move for problem in shippable's testing

* Python-2.4 needs to use b()
2016-09-02 20:32:14 -07:00
Matt Clay
75cb27ffe3 Enable more python 3 tests that now pass. (#17359) 2016-09-01 15:30:58 -07:00
Matt Clay
2ffb136b3f Add support for testing module PRs with python3. (#17339) 2016-08-31 16:41:00 -07:00
Matt Clay
6e65ebda26 Put integration.sh pip reqs in separate file. (#17338) 2016-08-31 15:16:15 -07:00
Matt Davis
1c33b5a9f0 fix remote shippable target failures (#17287)
cryptography upgrade caused fatal error when pycrypto was not installed
2016-08-29 14:01:25 -07:00
Toshio Kuratomi
4a3a9c0f2d Fix for run_command on py3 and enable lineinfile test on py3 (#17257)
* run_command needed a bit of tweaking to its string handling of
  arguments.
* The run_command change fixes the last bit of lineinfile so we can
  enable its tests
2016-08-26 01:30:46 -07:00
Matt Clay
178292d2cd Fix file and copy modules on py3 and enable tests. (#17239)
- Fix octal formatting of file mode in module response on py3.
- Convert file path to unicode in copy action.
- Enable file and copy module tests for py3 now that they pass.
2016-08-25 07:44:31 -07:00
Matt Clay
acc8a13eff Enable more tests that pass on python 3. (#17233) 2016-08-24 17:18:39 -07:00
Toshio Kuratomi
380a5801e9 Enable integration tests on python3 that are already working (#17212) 2016-08-24 16:41:05 -07:00
Matt Clay
e2e7390adc Add Python 3 CI support. (#17209) 2016-08-23 23:08:11 -07:00
Matt Clay
a695e18615 Add support for OS X CI on Shippable. (#17160) 2016-08-23 10:49:46 -07:00
Matt Clay
04bd6a3619 Make tests more cross platform. (#17154) 2016-08-19 10:23:14 -07:00
Brian Coca
4fb09d5693 moved from extras repo where it incorrectly exists (#17124)
* moved from extras repo where it incorrectly exists

* added to sanity exclusion for 2.4

* changed license with author's consent
2016-08-18 09:47:21 -04:00
Matt Clay
b44eb402bd Update ansible-core-ci endpoint. (#17071) 2016-08-12 12:07:41 -07:00
Matt Clay
901042f458 Generate test script to file instead of stdout. 2016-08-11 15:42:43 -07:00
Matt Clay
2b0d63b0d8 Flush stderr to avoid lost output. 2016-08-11 15:14:22 -07:00
Matt Clay
80385a47bd Remove FreeBSD interpreter test hacks. (#17007)
* Add TEST_FLAGS to no_log target.
2016-08-08 13:10:03 -07:00
Filipe Niero Felisbino
e54a9d3a51 Add generic data structures querying (#13684)
* Query lookup plugin

* Add license and docstrings

* Add python3-ish imports

* Change query plugin type from lookup to filter

* Switch from dq to jsonpath_rw

* Add integration test for query filter

* Rename query filter to json_query

* Add jsonpath-rw

* Rename query filter to json_query

* Switch query implementation from jsonpath-rw to jmespath
2016-08-08 11:55:59 -04:00
Matt Clay
d2fb845955 Enable more FreeBSD integration tests. (#16991) 2016-08-08 00:31:04 -07:00
Matt Clay
72cca01cd4 Use file list, not recursion, in _fixup_perms. (#16924)
Run setfacl/chown/chmod on each temp dir and file.

This fixes temp file permissions handling on platforms such as FreeBSD
which always return success when using find -exec. This is done by
eliminating the use of find when setting up temp files and directories.

Additionally, tests that now pass on FreeBSD have been enabled for CI.
2016-08-05 18:40:28 -07:00
Matt Clay
5f12731797 Run more integration tests on FreeBSD. (#16923) 2016-08-02 14:00:56 -07:00
Matt Clay
17e4629d52 Add remote CI support for modules. (#16908) 2016-08-01 15:39:17 -07:00
Matt Clay
e2602e9be0 Add FreeBSD to Shippable CI. (#16883) 2016-08-01 13:46:37 -07:00