Commit graph

1043 commits

Author SHA1 Message Date
Matt Davis
ead23783be slightly increase win_async_wrapper fire and forget sleeptime
* should fix Shippable timeouts when AWS CPU credits are low- right on the bubble of failure w/ 5s execution
2017-05-09 11:22:29 -07:00
Dag Wieers
bc806ff479 Windows: Small fix to Add-Warning and Add-DeprecationWarning (#23520)
Simplified the logic, and fix the issue of having a nested list as
entry.

Also indicate that we deliberately want to retain $null values
(and i.e. do not want them to be turned into a boolean).
2017-05-09 09:18:37 -07:00
Ganesh Nalawade
5b3ea6562b Add junos integration test (#24404) 2017-05-09 18:41:48 +05:30
Benjamin Jolivot
e99815e9f5 Fortios file only mode + integration tests (#23275)
* WIP file_mode

* WIP

* Add file_mode + integration tests

* fix pep8

* Update doc fragments
Create mutualy_exclusive param
Fix yamllint problem in tests

* Add aliases file + main playbook for fortios

* Install pyfg before running tests

* Install pyfg before running tests in role

* Remove pre_task as it's done in roles

* Force pyFG minimal version for python3

* role_path not role_dir :(

* Change requirements

* Specify Error type when error on import

* Bug in pygf library with python 2.5 (PR is waiting https://github.com/spotify/pyfg/pull/19)

* Bad requirement format

* still bad format -_-'

* remove test/integration/fortios.py (auto generated by tests)
missing new lines at end of file

* pyFG is now fixed in 0.50
2017-05-09 13:51:19 +01:00
Matt Clay
d999d613cb Python 3 fixes for CloudStack modules and tests. (#24400) 2017-05-09 13:37:08 +02:00
René Moser
aaf4f04574 automated integration tests for cloudstack (#20552) 2017-05-09 11:32:11 +08:00
Matt Clay
86bf27511c Migrate cs_sshkeypair test to ansible-test. 2017-05-07 01:44:33 +08:00
Matt Clay
17e07a27b2 Enable cloud tests for use with ansible-test. 2017-05-05 21:46:29 +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
Toshio Kuratomi
a0dfa8616a Make fetch default to fail on errors
Fixes #23501
2017-05-03 09:37:31 -07:00
Matt Clay
00f8e3d360 Fixes for EC2 module integration tests. 2017-05-03 22:40:08 +08:00
Toshio Kuratomi
3428f42120 Add integration test that modules are loaded from the expected locations (#24170)
* Add integration test that modules are loaded from the expected locations
* Fix ping module to pass PEP8
2017-05-01 08:52:25 -07:00
SesquipedalianDefenestrator
3f321e7591 Add check_mode to get_url (#20532)
* Add check_mode to get_url that does a HEAD request to make sure the URL exists, but doesn't write the real file

* Add info about new --check behavior to docs.  Add tests for the new behavior.  Populate res_args with the info the tests are looking for.

* Add trailing comma

* Change nonexistent test URL to http://{{httpbin_host}/DOESNOTEXIST.  Fix spacing while I'm at it

* Further spacing cleanup

* State that this functionality is in Ansible 2.4+
2017-04-28 14:43:51 +01:00
John R Barker
ecbf8e933a Docs how to test (2nd) (#24094)
* Big testing doc refactor
* Combine all the testing documentation in to one place to make it easier to find
* Convert everything to RST
* Create testing_network guide
* Create testing landing page
* For each section detail "how to run" and "how to extend testing"
* More examples
* Lots more detail
2017-04-28 09:08:26 +01:00
Pierre-Louis Bonicoli
a13d89da68 Debian: really generate locales
/usr/sbin/locale-gen differs between Debian and Ubuntu. With Debian,
locales must be added to /etc/locale.gen before calling locale-gen
command. With Ubuntu, /etc/locale.gen is updated by
/usr/sbin/locale-gen.

Use the locale-gen module which handles both distributions.
2017-04-28 09:10:20 +08:00
Pilou
bf5d87af07 PostgreSQL Integration test suite: improvements (#23631)
* PostgreSQL tests: use package module
* PostgreSQL tests: use ansible_service_mgr in order to test init system
* PostgreSQL tests: fix a typo
* PostgreSQL tests: install only required packages
* PostgreSQL tests: use role default value when unchanged
2017-04-28 09:09:40 +08:00
Nathaniel Case
fc0bf87c20 Run save inside config mode. (#23977)
* Run `save` before exiting config mode.

* Fix unit tests for `save`

* Allow `save` to be on its own again and introspect success

* Introspecting `compare running` makes this a lot harder.

Move `save` tests to integration tests
2017-04-27 11:08:37 -04:00
Toshio Kuratomi
bffccb5396 fetch idempotence test and deprecate validate_md5
Added an integration test for fetch module idempotence.  (Testing
that validate_checksum is doing what it's supposed to is harder as we'd
have to create a race condition with the downloaded data to trigger it.
Probably need to make that a unittest eventually).

Also give a deprecation message to the validate_md5 parameter so that we
can eventually get rid of it.
2017-04-26 12:00:01 -07:00
Brian Coca
e29dc49a49 moved to exceptions for basic skip/fails
better handling of checkmode and async
fix test to follow new flow control
2017-04-25 14:48:56 -04:00
Brian Coca
4594bee65a keep unsafe .. unsafe (#23742)
* keep unsafe .. unsafe

fixes #23734, which was broken in previous fix that allowed non string types to be templated
use new 'is_template' function vs bastardizing others
refactored clean_data to allow for arbitrary data structures to clean
fixed/removed some tests

* deal with complex data for is_template

* typos
2017-04-21 16:07:38 -04:00
Guillaume Coré
c7f4c97b18 async+script: add integration test (#23818)
see #23729
2017-04-21 01:06:01 -04:00
Ricardo Carrillo Cruz
0bbfd3d4e0 Add missing aliases file to ios_system integration target (#23795) 2017-04-20 12:33:22 +02:00
Ricardo Carrillo Cruz
82fd038998 Add missing aliases file to iosxr integration tests targets (#23796) 2017-04-20 12:32:36 +02:00
Adrian Likins
ae3d7fb29e Fix vault reading from stdin (avoid realpath() on non-links) (#23583)
* Fix vault reading from stdin (avoid realpath() on non-links)

os.path.realpath() is used to find the target of file paths that
are symlinks so vault operations happen directly on the target.

However, in addition to resolving symlinks, realpath() also returns
a full path. when reading from stdin, vault cli uses '-' as a special
file path so VaultEditor() will replace with stdin.
realpath() was expanding '-' with the CWD to something like
'/home/user/playbooks/-' causing errors like:

        ERROR! [Errno 2] No such file or directory: u'/home/user/ansible/-'

Fix is to specialcase '-' to not use realpath()

Fixes #23567

* to_text decrypt output when writing to stdout
2017-04-18 13:09:02 -04:00
Brian Coca
8382ed7200 added test emulating #23180 use case 2017-04-12 18:34:29 -04:00
Matt Martz
621e27b5dd Urls client cert auth (#18141)
* Build HTTPSClientAuthHandler more similarly to how HTTPSHandler works

* Add docs for new client cert authentication

* Support older versions of python

* Simplify logic

* Initial support for client certs in urls.py

* Add an extra test

* Add a get_url test for client cert auth

* Add additional test for client cert auth, with validation and ssl mismatch

* Skip assert when http tester not available

* Update version_added for new options
2017-04-07 09:54:37 -07:00
Toshio Kuratomi
78ced5318f Fix for recursive copy slowness
Copy module was walking over files in subdirectories repeatedly (a
directory tree a few levels deep could bring the time spent into the
tens of minutes)

This was traced to the fix for this bug report: https://github.com/ansible/ansible/issues/13013

Fixed #13013 a different way and added an integration test to check for
regressions of #13013 as we optimize this code.

Fixes #21513
2017-04-07 12:41:42 -04:00
Matt Martz
ac61f09203 Extra deps needed for building cryptography 2017-04-07 09:19:26 -07:00
Matt Martz
13ac993d25 Fallback to old ssl_wrap_socket 2017-04-07 09:19:26 -07:00
Matt Martz
b4b76bab14 Update install deps for SNI tests 2017-04-07 09:19:26 -07:00
Ricardo Carrillo Cruz
13b2f11139 Do not assert session name on idempotent eos banner (#23402)
* Check for proper response key on eos_banner map_config_to_obj

If we run the task with 'login' banner, the 'show banner' command
will return a dict containing key 'loginBanner'.
However for motd, it will just return 'motd'.
Yay naming consistency!

* Do not assert session exists on eos_banner response not changing device
2017-04-07 15:44:06 +02:00
Ricardo Carrillo Cruz
ce9826d76e Fix eos_banner basic-motd eapi asserts (#23398)
The commands in EAPI does not contain the plain command sent to the
device as a one liner, but it is split in cmd/input keys.
2017-04-07 14:18:40 +02:00
Ricardo Carrillo Cruz
2cc2b8fb4d Add missing provider to eos_banner basic-motd eapi test (#23396)
Otherwise this stalls and timeouts, it doesn't have creds to run.
2017-04-07 13:39:33 +02:00
Chris Alfonso
394cb3477b Fixes loginBanner plucking over eapi transport when loginBanner isn't set. (#23363) 2017-04-06 10:58:04 -06:00
Nathaniel Case
98c23a3342 Attempt to clear up nxos_mtu tests and documentation (#23361)
nxos_system wasn't added until 2.3, so nxos_mtu should have been deprecated
then.
2017-04-06 12:26:17 -04:00
Matt Clay
40e88dadbe Disable zypper tests for CI due to timeouts. 2017-04-06 08:48:31 -07:00
Ricardo Carrillo Cruz
4571ff0b52 Fix eapi basic-login asserts (#23318)
The asserts where not checking the commands sent to the device
2017-04-05 20:37:58 +02:00
Ricardo Carrillo Cruz
cf30f0f27d Fix asserts on ios_banner tests (#23315)
The contain assert was broken.
2017-04-05 20:00:10 +02:00
Ricardo Carrillo Cruz
d268471739 Fix basic-login eapi tests for eos_banner (#23304)
We should be passing the provider dict, not the transport.
2017-04-05 19:11:12 +02:00
John R Barker
f22702eee2 enable ios_facts tests again (#23310) 2017-04-05 17:50:32 +01:00
Nathaniel Case
d890167575 Fix nxos_facts for nxapi transport (#23302)
* Partial revert of 2e476e64cd

This broke handling of nxos_facts over nxapi

* Fix nxos_facts tests not run in isolation
2017-04-05 11:47:37 -04:00
Robin Roth
6f40cb9647 Add workaround for evasive in apache2_module (#22649)
* Add workaround for evasive in apache2_module

* Fixes #22635
* Clean up workarounds for php/shib
* Add test for evasive workaround
* Remove use of re module, since all searches work with native python

* Add unit tests to apache2_module name replacements

Go back to using re package where needed

* Rename replace_name to create_apache_identifier
2017-04-04 14:12:06 -04:00
Chulki Lee
99ef1f3a9f git: git reset with branch
`git reset <ref>` can be ambiguous and fail to switch to the correct branch.
To avoid it, specify branch as well.
2017-04-04 10:45:04 -07:00
Matt Clay
79fa5ef4cb Add missing group_vars to group_by test. 2017-04-04 10:14:10 -07:00
Brendan Jurd
7fb1519035 Add integration tests for group_by precedence.
Test that, when a group is created with group_by, variables from the
corresponding group_vars/ file are correctly pulled in, and override
variables specified in group_vars/all.

See ansible/ansible#8664.
2017-04-04 10:14:10 -07:00
Matt Clay
b7cc4616b1 Fix integration aliases. 2017-04-03 17:49:35 -07:00
Matt Clay
58c2470e8f Fix deploy_helper integration tests. 2017-04-03 16:59:40 -07:00
Ramon de la Fuente
550d229c7b added deploy_helper module tests 2017-04-03 16:59:40 -07:00
Jordan Borean
3e1a16c574 win_find fix up age parameter (#23195) 2017-04-03 11:43:07 -07:00
Jordan Borean
4d1b97d1ae win_stat change return islink to islnk to match stat (#23196) 2017-04-03 11:38:34 -07:00