summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Use jinja2 import instead of pip to get version.Matt Clay2017-01-191-1/+1
| | | | | | This resolves issues with older versions of pip. (cherry picked from commit a8fb6f0958704c2f6d5b1be776423dc6263a82cf)
* Only test map on jinja2 >= 2.7Matt Clay2017-01-191-0/+3
| | | | (cherry picked from commit ad652746437b4e7d225a9725a501ca1cdfd07969)
* Fix group_by test to work with jinja2 >= 2.9.Matt Clay2017-01-091-2/+2
| | | | (cherry picked from commit cc3d131f503b34ae972dbed94a0b5fde567aab92)
* Switch test_lookups to badssl/local testing. (#16466) (#18144)Matt Clay2016-10-214-3/+6
| | | | | | * Switch test_lookups to badssl/local testing. * Use var for checking badssl host content. (cherry picked from commit 394430a61e6caa8462805c2b6fa58a8abb06832e)
* Backport validate-modules to stable-2.1 so we can have versioned testing ↵John R Barker2016-10-207-0/+1001
| | | | | (#18120) See #18001 for more details
* Disable mount tests for now. Mount is buggy on too many platformsToshio Kuratomi2016-09-231-1/+1
|
* Add tests for the mount module (#17718)Toshio Kuratomi2016-09-232-1/+114
| | | | | | | | | | | * 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
* Use loop_control.loop_var directlyAbhijit Menon-Sen2016-09-233-0/+11
| | | | | | | | | | | 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 950cc26aab01e20a8b942958d640dca38788b3e9)
* Remove _load_hosts() from Play initialization as it's no longer needed and ↵Toshio Kuratomi2016-09-214-1/+95
| | | | | | | | it breaks using extra_vars defining a list for hosts (#17699) Thanks to @jimi-c for the solution Fixes #16583
* Add a test for int/float parameter type checking (#16741)Christoph2016-09-211-0/+46
| | | | | | | A parameter of type int should accept int and string, but not float. A parameter of type float should accept float, int, and string. Also reset the arguments in another test so that it runs cleanly. This agrees with what all the other tests are doing.
* add win_user regression testsnitzmahone2016-09-111-0/+29
| | | | | | 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 69880f16404caac69c0d86c895e8ec3e233c556b)
* Add partially backwards compatible version of _fixup_perms. (#17427)Matt Clay2016-09-061-1/+1
| | | | | | | | Also added a deprecation notice for _fixup_perms. Resolves issue #17352 (assumes custom actions use recursive=False). (cherry picked from commit 94a0d2afb4b7b74bbefd5ab57d459f0e74b060a2)
* task_result _check_key should handle empty results (#16766)Will Thames2016-08-291-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 eb2a3a91a8e2baa59e8d2c7c97085e3be7a11f5a)
* fixed tests to accoutn for new parameterBrian Coca2016-08-171-6/+6
| | | | (cherry picked from commit b1410fa2780c50a42214961b573e13f1fc7b2ebc)
* set cwd to task's basedir (#16805)Brian Coca2016-08-081-1/+3
| | | | | | | | | | | | | | | * switch cwd to basedir of task This restores previous behaviour in pre 2.0 and allows for 'local type' plugins and actions to have a more predictable relative path. fixes #14489 * removed FIXME since prev commit 'fixes' this * fix tests, now they need a loader (thanks jimi!) (cherry picked from commit e2f17f8d9b212b1e8d65c12a778d036753831ab6)
* fix for unspecified retries on until + test (#16963)Matt Davis2016-08-042-0/+33
| | | | | fixes #16907 (cherry picked from commit 746ea64d305a95862c1fbc2835de2c5e1724283d)
* Add a function to check for killed processes in all strategies (#16684)jctanner2016-07-141-1/+5
| | | | | | | * Add a function to check for killed processes so that if any threads are sigkilled or sigtermed, the entire playbook execution is aborted. (cherry picked from commit 238c6461f643d7610896c89c08f0e57eff16d0e5)
* Fixing type in 293723f (mock_handler -> mock_handler_task)James Cammarata2016-07-121-1/+1
|
* Fix unit test for base strategy in regards to handler changesJames Cammarata2016-07-121-0/+1
|
* Revert "update action unit test for powershell shebang behavior"nitzmahone2016-07-111-1/+1
| | | | This reverts commit 637f6f23e130fe8a707813e59b919bf84433f718.
* update action unit test for powershell shebang behaviornitzmahone2016-07-111-1/+1
| | | | (cherry picked from commit de549ad675bad59559cefb9f3049ace46310f27e)
* fix win_msi tests by setting wait: true on all win_msi tasks.=2016-07-081-0/+4
| | | | | 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.
* Updating integration tests for async testingJames Cammarata2016-07-071-2/+2
| | | | (cherry picked from commit cd4412016aea873669ec08d024b5a54581376c8d)
* Fix unit tests for handler stuff in base strategy testJames Cammarata2016-07-061-1/+1
|
* Fix git shallow update (#16224)Robin Roth2016-07-051-5/+51
| | | | | | | | | | | | * 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 d0ccedc617844671d25fb2e0a2ac717eb7a9a076)
* Fix test_async. (#16552)Matt Clay2016-07-012-4/+12
| | | | | | | * Conditionally run test_async in docker containers. * Revise test_async test. (cherry picked from commit 4e369a31db566c3017b24b1460bdc88dfb9ecad7)
* Run test_async after test_connection.Matt Clay2016-07-011-1/+1
|
* Parse async response in async action. (#16534)Matt Clay2016-07-013-3/+22
| | | | | | | | | | * 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 292785ff2bf557cafbe2bd18e95f2bd26cce0f0b)
* Update shippable shared dir for COPY_SOURCE. (#16511)Matt Clay2016-06-291-1/+1
| | | | | | | Tests now use '/shared' instead of '/tmp/shared-dir' when using COPY_SOURCE. This avoids issues with containers purging '/tmp'. (cherry picked from commit fbfadc47c7368e444c403fac112a24a089a09e4f)
* Lookup password omit salt (#16361)Pilou2016-06-271-2/+56
| | | | | | | | | | | * 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 b361bf90d70aa82b95150ab8222768f1b055b0bc)
* fix win_setup integration test to match fact namenitzmahone2016-06-171-1/+1
| | | | (cherry picked from commit a45e842ba1c030d9022bf2e23ca7ad5002a2019c)
* added further tests for win_regedit to cover the changes made=2016-06-161-0/+43
| | | | under https://github.com/ansible/ansible-modules-extras/pull/2436
* Track notified handlers by object rather than simply their nameJames Cammarata2016-06-141-3/+18
| | | | | | | | | | | | | | | | | | Due to the fact that roles may be instantiated with different sets of params (multiple inclusions of the same role or via role dependencies), simply tracking notified handlers by name does not work. This patch changes the way we track handler notifications by using the handler object itself instead of just the name, allowing for multiple internal instances. Normally this would be bad, but we also modify the way we search for handlers by first looking at the notifying tasks dependency chain (ensuring that roles find their own handlers first) and then at the main list of handlers, using the first match it finds. This patch also modifies the way we setup the internal list of handlers, which should allow us to correctly identify if a notified handler exists more easily. Fixes #15084
* Fix docker unit test. Not deprecated in 2.1.Matt Clay2016-06-111-1/+1
|
* raw should not use default executable (#16085)Brian Coca2016-06-102-1/+113
| | | | | also removed unused cruft in script (cherry picked from commit a529a6047806dc7d1e55e9e36201e5b2ed57bf27)
* Expand return code values returned by TQM and strategiesJames Cammarata2016-06-081-4/+9
| | | | | | | | | | This allows the PlaybookExecutor to receive more information regarding what happened internal to the TaskQueueManager and strategy, to determine things like whether or not the play iteration should stop. Fixes #15523 (cherry picked from commit fbec2d9692cdbbddda1f6ecb68bbca67e3b783b4)
* use userdir module as example instead of alias (#15540)Robin Roth2016-06-061-10/+10
| | | | | | | | * 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 cf62a62b83a461658c2161ad7a6c433e33308515)
* tests, postgresql: add ubuntu 16.04 supportRene Moser2016-06-061-0/+10
| | | | (cherry picked from commit 5583027f99745c7b37575cfcad0b17153a0119a7)
* tests, apt_repository: disable Ubuntu 16.04 as there is no package yetRene Moser2016-06-061-1/+1
| | | | (cherry picked from commit 39e4caafb2367b258bb546cd21a4f804c559d21e)
* Detect use of Travis tests on Shippable.Matt Clay2016-06-061-0/+10
| | | | | | This can occur when building pre-Shippable branches or PRs. (cherry picked from commit 03597143d017fd9c9084754ac5af590d215caa0b)
* Run tests on ubuntu1604 and opensuseleap (#15936)Robin Roth2016-06-069-37/+93
| | | | | | | | | | | | | | | * 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 c06884eff03ad133b83a27c2839055a65f669d36)
* tests: fix tests on Debian 8Rene Moser2016-06-066-14/+24
| | | | (cherry picked from commit c20d1fced7c5ee786d298da6a08fb60bd75cf0f3)
* Corrected reference to httptester container.Matt Clay2016-06-061-2/+2
| | | | (cherry picked from commit b755bcd875510261e916f61853a9c2019b57f620)
* Add httptester docker container files and update run_tests.sh to use ↵Matt Martz2016-06-064-2/+86
| | | | | | ansible/httptester (cherry picked from commit 164f247ec838ea1fcde46422b27593160dc22b34)
* Do not test vca and vmware.py for py2.4 (#15887)Michael Scherer2016-06-061-1/+1
| | | | | | | Since both of them depend on libraries not working on python 2.4, we shouldn't restrict ourself on 2.4, cf https://github.com/ansible/ansible/pull/15870 (cherry picked from commit cc61531a7445dc1d93f772a08f737613c644b087)
* Use httptester docker image for http tests (#15811)Matt Martz2016-06-0611-84/+111
| | | | | | | | * Use httptester docker image for http tests * When not running with an httptester linked container, use public test sites (cherry picked from commit accf40d8a854aa42ca17d6a01958f0ca5be23668)
* fix default for removing imagesBrian Coca2016-06-061-1/+1
| | | | (cherry picked from commit 2af8e3b9d8b7e5c14ea61abeeccf705dc00a050d)
* added ability to also subset make testsBrian Coca2016-06-061-1/+1
| | | | (cherry picked from commit 27a1ae4732ef0aad9dd31fa80431e39259ed3c05)
* another var 'defaulted' in run_testsBrian Coca2016-06-061-1/+1
| | | | (cherry picked from commit 47d58c30e4f80d68e13efa3def2886e22d3e64ee)
* added defaults for 'optional' varsBrian Coca2016-06-061-2/+2
| | | | (cherry picked from commit 3669ab24563c09fc06348f404f881710062998ad)