Commit graph

673 commits

Author SHA1 Message Date
Matt Clay
aadf342b46 Switch test_lookups to badssl/local testing. (#16466) (#18144)
* Switch test_lookups to badssl/local testing.
* Use var for checking badssl host content.

(cherry picked from commit 394430a61e)
2016-10-21 21:40:25 -07:00
Toshio Kuratomi
66ffe199e5 Disable mount tests for now. Mount is buggy on too many platforms 2016-09-23 16:37:49 -07:00
Toshio Kuratomi
a4611ff509 Add tests for the mount module (#17718)
* Add tests for the mount module

* Switch from unmounted to absent...

the code for mounting always modifies fstab so we need to always modify
fstab to cleanup as well.

* Fix comments and copyright
2016-09-23 12:54:09 -07:00
Abhijit Menon-Sen
cc71765d9e Use loop_control.loop_var directly
6eefc11c converted task.loop_control into an object, but while the other
callers were updated to use .loop_var instead of .get('loop_var'), this
site was overlooked.

This can be reproduced by including with loop_control a file that does
set_fact; a simple regression test along these lines is included.

(cherry picked from commit 950cc26aab)
2016-09-23 10:39:06 -05:00
Toshio Kuratomi
eaba2152f3 Remove _load_hosts() from Play initialization as it's no longer needed and it breaks using extra_vars defining a list for hosts (#17699)
Thanks to @jimi-c for the solution

Fixes #16583
2016-09-21 20:41:13 -07:00
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
Matt Clay
8659f255df Fix test_async. (#16552)
* Conditionally run test_async in docker containers.
* Revise test_async test.

(cherry picked from commit 4e369a31db)
2016-07-01 18:01:16 -07:00
Matt Clay
6755e9c848 Run test_async after test_connection. 2016-07-01 16:06:13 -07:00
Matt Clay
75fa80f73c Parse async response in async action. (#16534)
* Parse async response in async action.
* Add async test for non-JSON data before module output.
* Fix existing async unit test.

Resolves #16156

(cherry picked from commit 292785ff2b)
2016-07-01 15:24:41 -07: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
Toshio Kuratomi
85bef402b1 Merge pull request #14614 from gundalow/test_binary
non-destructive says we should run test_binary at v2
2016-04-25 09:45:00 -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
Brian Coca
33761efd19 Merge pull request #15417 from bcoca/copy_vaulted
Copy vaulted
2016-04-19 10:22:30 -04: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
Matt Davis
822f904aa6 Merge pull request #14813 from mattclay/lxd-plugin
Add lxd connection plugin.
2016-04-19 02:06:31 -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 Clay
5fc76df18b Add lxd connection plugin. 2016-04-15 19:10:57 -07: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
Cambell
cdf6e3e4bf feature/copy-vault-dataloader: Add method get_real_file(file_path) to dataloader
- get_real_file will decrypt vault encrypted files and return a path to
  a temporary file.

- cleanup_real_file will remove a temporary file created previously with
  get_real_file
2016-04-14 14:12:48 -04: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 Clay
af8258cdf2 Revert "Increase verbosity of connection tests." (#15305) 2016-04-14 11:06:46 -04: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