Commit graph

526 commits

Author SHA1 Message Date
nitzmahone
2e06f0b427 add win_user regression tests
Ensure https://github.com/ansible/ansible-modules-core/issues/4369 doesn't occur again, also adds tests for password set when expired.

(cherry picked from commit 69880f1640)
2016-09-11 20:47:40 -07:00
Will Thames
c9b212c5bd task_result _check_key should handle empty results (#16766)
When a task result has an empty results list, the
list should be ignored when determining the results
of `_check_key`. Here the empty list is treated the
same as a non-existent list.

This fixes a bug that manifests itself with squashed
items - namely the task result contains the correct
value for the key, but an empty results list. The
empty results list was treated as zero failures
when deciding which handler to call - so the task
show as a success in the output, but is deemed to
have failed when deciding whether to continue.

This also demonstrates a mismatch between task
result processing and play iteration.

A test is also added for this case, but it would not
have caught the bug - because the bug is really in
the display, and not the success/failure of the
task (visually the test is more accurate).

Fixes ansible/ansible-modules-core#4214
(cherry picked from commit eb2a3a91a8)
2016-08-29 08:40:38 -07:00
Matt Davis
baaa1d3013 fix for unspecified retries on until + test (#16963)
fixes #16907
(cherry picked from commit 746ea64d30)
2016-08-04 19:31:49 -04:00
=
c6faf106f8 fix win_msi tests by setting wait: true on all win_msi tasks.
I suspect this problem was masked previously as older versions of pywinrm
where significantly slower, allowing more time for the windows installer service to complete.
2016-07-08 13:36:06 -07:00
James Cammarata
4b86191a24 Updating integration tests for async testing
(cherry picked from commit cd4412016a)
2016-07-07 14:18:26 -05:00
Robin Roth
5982a0632f Fix git shallow update (#16224)
* add git shallow fetch test

covers https://github.com/ansible/ansible-modules-core/issues/3782

updating a repo with depth=1 fails silently if version==HEAD

* raise git version support supporting depth to 1.9.1

(cherry picked from commit d0ccedc617)
2016-07-05 17:00:20 -04:00
Pilou
57eb60757c Lookup password omit salt (#16361)
* Lookup unencrypted password must not include salt
* Integration test lookup: remove previous directory
* Test that lookup password doesn't return salt
* Lookup password: test behavior with empty encrypt parameter

Closes #16189

(cherry picked from commit b361bf90d7)
2016-06-27 10:47:33 -07:00
nitzmahone
bb43d4d00b fix win_setup integration test to match fact name
(cherry picked from commit a45e842ba1c030d9022bf2e23ca7ad5002a2019c)
2016-06-17 12:29:02 -07:00
=
5d03a65ee8 added further tests for win_regedit to cover the changes made
under https://github.com/ansible/ansible-modules-extras/pull/2436
2016-06-16 12:37:14 -07:00
Robin Roth
263e51095f use userdir module as example instead of alias (#15540)
* alias module is very basic and removing it leads to the suse default
  config failing
* future improvements might test different modules and the effect of
  them being removed
(cherry picked from commit cf62a62b83)
2016-06-06 18:54:26 -07:00
Rene Moser
e1765c9d0d tests, postgresql: add ubuntu 16.04 support
(cherry picked from commit 5583027f99)
2016-06-06 18:08:36 -07:00
Rene Moser
d14b29efc2 tests, apt_repository: disable Ubuntu 16.04 as there is no package yet
(cherry picked from commit 39e4caafb2)
2016-06-06 17:30:14 -07:00
Robin Roth
945fb3411e Run tests on ubuntu1604 and opensuseleap (#15936)
* reduce async sleep time in test
* make zypper test less destructive (don't break following uses of zypper)
* fix ca cert on suse
* fix/enable postgres/mysql on opensuseleap
* fix mysql test for mysql versions 5.7.6 and newer
* skip sni_host check on ubuntu1604
* add HTTPTESTER flag for test_uri

ubuntu 16.04 uses dash which drops env variables containing a dot
we work around this by adding an explicit env variable to enable httptester

(cherry picked from commit c06884eff0)
2016-06-06 16:48:17 -07:00
Rene Moser
e2ebae5522 tests: fix tests on Debian 8
(cherry picked from commit c20d1fced7)
2016-06-06 16:48:17 -07:00
Matt Martz
df33ff6c65 Use httptester docker image for http tests (#15811)
* Use httptester docker image for http tests

* When not running with an httptester linked container, use public test sites

(cherry picked from commit accf40d8a8)
2016-06-06 16:36:54 -07:00
Toshio Kuratomi
4304574c00 Fix unarchive failures when the destination is a symlink to a directory (#15999)
Also add integration tests for this problem and unicode filenames inside
a tarball.

Fixes #3725
2016-05-26 15:02:10 -07:00
nitzmahone
ff346a199c fix windows integration tests to run under kerberos users 2016-05-17 15:32:32 -07:00
Toshio Kuratomi
d2e8e8d6a7 Switch to a different url for testing SNI right now. (#15798) 2016-05-10 07:10:28 -07:00
Yannig
40c0f34c41 When var name is the same as var content, try to template it before reporting that var is not defined. (#13629)
* When var name is the same as var content, try to template it before reporting that var is not defined.
Add asserts in test_var_blending to check this special corner case.

* Fix integration tests when using debug with list or dict.
2016-05-01 06:48:54 -07:00
Robin Roth
1c447016c3 extend zypper integration tests (#15596)
* extend zypper integration tests

* fix caching issue of local RPMS on openSUSE 42.1 Leap
* add tests for simultaneous install/remove via prefixes +-
* test fail cases (rm patch or URL)
* test patch install (succes, unchanged second run, fail on wrong name)

* add test for pattern install
2016-04-27 10:38:34 -07:00
jctanner
4d36b3f7b6 Extend the get_url integration tests to include file schemas. (#15532)
Addresses https://github.com/ansible/ansible-modules-core/issues/3511
2016-04-22 11:38:03 -07:00
Robin Roth
7a4e4c2b02 extend integration test for zypper_repository (#15387)
* include options refresh and priority introduced in ansible/ansible-modules-extras#1990
* test repo update both based on name and URL
* run on all suse flavors
* test overwriting repos by url or name
2016-04-21 20:10:29 +02:00
Robin Roth
59bad647b6 Revert "Disable new git tests until a fix for rhel6/7 is merged."
This reverts commit 197d3dfe97.
2016-04-20 09:52:02 +02:00
Toshio Kuratomi
197d3dfe97 Disable new git tests until a fix for rhel6/7 is merged. 2016-04-19 08:53:19 -07:00
Robin Roth
e8b1c4e14a add test for git with both depth and version arguments (#15471)
* add test for ansible/ansible-modules-core#3456

combination of options version and depth

* add test of switching to older branch
2016-04-19 07:00:45 -07:00
James Cammarata
6eefc11c39 Make the loop variable (item by default) settable per task
Required for include+with* tasks which may include files that also
have tasks containing a with* loop.

Fixes #12736
2016-04-19 01:42:40 -04:00
Matt Davis
6322ed833e Merge pull request #15422 from jhawkesworth/win_regedit_binary_tests
Windows: add win_regedit integration tests (needs https://github.com/ansible/ansible-modules-extras/pull/2034)
2016-04-18 10:56:30 -07:00
James Cammarata
ed35e8bce2 Don't override the http status code when successful in urls.py 2016-04-18 13:20:24 -04:00
Robin Roth
9bb069f873 Apache2 module integration test (#15380)
* add integration test for apache2_module

* fix assert syntax

* check os_family for this test

* add comment why only debian and suse are tested

* move apache2 test to destructive

* install apache2 package
2016-04-18 18:00:02 +02:00
Matt Martz
a985bf6a31 Don't pass context to urlopen, instead add it to the handlers. Fixes https://github.com/ansible/ansible-modules-core/issues/3437 2016-04-15 16:10:54 -05:00
Robin Roth
b48e628429 test git version before running test on depth 2016-04-15 09:49:05 +02:00
=
157072a39f Windows: win_regedit integration tests (following https://github.com/ansible/ansible-modules-extras/pull/2034 ) 2016-04-14 21:47:17 +01:00
Robin Roth
776bffb52b Expand git integration test (#15391)
* add testcases to git for depth

* also in combination with refspec, which gets more tricky

* add testcase for ansible/ansible-modules-core#527
2016-04-14 09:41:10 -07:00
Matt Martz
dd39f57ae7 Merge pull request #15289 from sivel/sni-urllib3-contrib-try2
Optional Use of urllib3 for SNI verification
2016-04-08 11:26:49 -05:00
nitzmahone
698ae7c383 ensure test_win_user fails on bogus error
We weren't previously checking the error message- it failed as expected, but for the wrong reason.
2016-04-07 18:24:12 -07:00
Matt Martz
6e9c09d7f7 Utilize urllib3.contrib.pyopenssl functionality for SNI capability in python versions lacking SNI support
Also add SNI tests, move test_uri to destructive since we are messing with packages for SNI testing
2016-04-06 10:14:13 -05:00
Toshio Kuratomi
4b0aa1214c Ziploader
* Ziploader proof of concept (jimi-c)

* Cleanups to proof of concept ziploader branch:

* python3 compatible base64 encoding
* zipfile compression (still need to enable toggling this off for
  systems without zlib support in python)
* Allow non-wildcard imports (still need to make this recusrsive so that
  we can have module_utils code that imports other module_utils code.)
* Better tracebacks: module filename is kept and module_utils directory
  is kept so that tracebacks show the real filenames that the errors
  appear in.

* Make sure we import modules that are used into the module_utils files that they are used in.

* Set ansible version in a more pythonic way for ziploader than we were doing in module replacer

* Make it possible to set the module compression as an inventory var

This may be necessary on systems where python has been compiled without
zlib compression.

* Refactoring of module_common code:

* module replacer only replaces values that make sense for that type of
  file (example: don't attempt to replace python imports if we're in
  a powershell module).
* Implement configurable shebang support for ziploader wrapper
* Implement client-side constants (for SELINUX_SPECIAL_FS and SYSLOG)
  via environment variable.
* Remove strip_comments param as we're never going to use it (ruins line
  numbering)

* Don't repeat ourselves about detecting REPLACER

* Add an easy way to debug

* Port test-module to the ziploader-aware modify_module()

* strip comments and blank lines from the wrapper so we send less over the wire.

* Comments cleanup

* Remember to output write the module line itself in powershell modules

* for line in lines strips the newlines so we have to add them back in
2016-04-05 11:06:17 -07:00
James Cammarata
180a0a8e77 Fixing up the logic in the test_script tests removal portion 2016-03-31 15:59:19 -04:00
Michael Gruener
94806e1953 Add integration tests for the cloudflare_dns module 2016-03-25 21:22:29 +01:00
Brian Coca
1ebc2fda71 removes python requirement to script
mistakenly added when checksum was made to use stat module
fixed assertion in test
2016-03-24 16:17:58 -07:00
Brian Coca
9c6b49fd3d Merge pull request #15004 from agx/zypper-repository-integration-tests
Integration tests for zypper repository
2016-03-21 11:00:50 -07:00
Toshio Kuratomi
6824f3a7cc Change url so that we don't test https in the tests for file perms 2016-03-20 08:49:40 -07:00
Toshio Kuratomi
cbd93b6ad3 Add integration test for #11821 2016-03-20 07:59:00 -07:00
Matt Clay
9a922fcf0d Update test to use mysql connect_timeout option. 2016-03-16 22:31:48 -07:00
Guido Günther
2095d1ab33 Integration tests for zypper repository 2016-03-16 19:56:56 +01:00
Rene Moser
5d5d905e36 cloudstack: new integration tests test_cs_resourcelimit 2016-03-15 21:41:08 +01:00
Rene Moser
4d6a15ebc3 cloudstack: new integration tests test_cluster 2016-03-15 21:41:08 +01:00
Rene Moser
d50026b108 cloudstack: new integration tests test_cs_pod 2016-03-15 21:41:08 +01:00
Rene Moser
ae6d2a5602 cloudstack: new integration tests test_cs_instance_facts 2016-03-15 21:40:45 +01:00
Rene Moser
d9f7589460 cloudstack: new integration tests test_cs_configuration 2016-03-15 21:39:09 +01:00