Commit graph

1037 commits

Author SHA1 Message Date
Jordan Borean
392d268809 win_find: fix for empty nested directories (#26164)
(cherry picked from commit 98fc54f02d)
2017-08-07 17:27:27 -07:00
Matt Clay
6698dc00e3 Add potential work-around for expect on macOS.
http://pexpect.readthedocs.io/en/stable/commonissues.html#truncated-output-just-before-child-exits

(cherry picked from commit 0c7602fb59)
2017-07-31 13:22:52 -07:00
Will Thames
2385e2be27 include_role handlers bug fix (#26335)
* Ensure that include_role properly fires handlers

include_role needs to ensure that any handlers included
with the role are added to the _notified_handler and
_listening_handler lists of the TaskQueueManager, otherwise
it fails when trying to run the handler.

Additionally, the handler needs to be added to the
PlayIterator's `_uuid_cache` or it fails after running
the handler

Add more uuid debug statements - this code was hard
to debug with existing debug statements, so add more
uuid information at little additional output cost.

Fixes #18411

* Add tests for include_role handlers

Tests for #18411

(cherry picked from commit ef8c9798d3)
2017-07-25 16:37:24 -05:00
Toshio Kuratomi
795e75433e Expand the result from pwd to make the test more robust
Sometimes MacOSX's pwd doesn't return an expanded path.  Not sure why
but this test is still valid if we expand it via a playbook filter so
go ahead and do that.

(cherry picked from commit 6a41a4f311)
2017-07-24 10:27:46 -07:00
Matt Clay
0e0400b12e Disable zypper* tests which are timing out.
(cherry picked from commit d031ff8aec)
2017-07-24 09:21:00 -07:00
Ricardo Carrillo Cruz
a3817721fc Cherry pick EAPI tearup/down tests changes (#26938)
* Replace Ethernet5 for Ethernet2 on eos integration tests (#26674)

In our CI, we only have 3 NICS: Management1, Ethernet1 and
Ethernet2.
(cherry picked from commit 4006b5d18f)

* Add CHANGELOG entry
2017-07-18 11:02:56 +02:00
Ricardo Carrillo Cruz
4490cc9e9e Cherry pick eapi tearup down changes (#26935)
* Remove enable EAPI from prepare_eos_tests (#26910)

Enabling EAPI is not common on CLI *and* EAPI tests, therefore
enabling it should be put at the eapi.yaml task level.
(cherry picked from commit 258d2058cd)

* Add missing provider on disable eapi tasks (#26928)

(cherry picked from commit 4532c791fd)

* Add CHANGELOG entry
2017-07-18 10:33:19 +02:00
Ricardo Carrillo Cruz
32b4342209 Cherry pick 2.4 eos banner fixes (#26904)
* Fix multiple EOS EAPI code and test issues (#26651)

(cherry picked from commit b81209c187)

* 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.
(cherry picked from commit ce9826d76e)

* Add CHANGELOG entry
2017-07-17 17:59:31 +02:00
Trishna Guha
85e9a07117 privilege escalation for eos integration test (#26597)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-07-10 19:30:30 +05:30
Jordan Borean
7f5a0715bf win_regedit: fix for same dword value (#26415)
(cherry picked from commit 8e9d04043a)
2017-07-05 08:24:26 +10:00
Matt Davis
f9f83c5826 converted become runas to explicit CreateProcessWithLogonW
* fixes become_method: runas for unprivileged users
* sets permissions on tempdir appropriately
* allows automatic system environment generation for new token (old Process.Start way prevents this)
* add basic become runas tests

(cherry picked from commit 6d99a0a93469448a2fd23169e31036263102e7e1)
2017-07-03 17:43:50 -07:00
John R Barker
e947321831 Remove trailing newlines (#26350) 2017-07-03 13:58:32 +01:00
John R Barker
9d94a309ca Remove test of openvswitch_db state (#26349)
The `state:` option didn't exist in Ansible 2.3, so don't test it.
2017-07-03 13:18:32 +01:00
Yanis Guenane
1ad1ad6ace Missing prepare_ovs_tests directory (#26337)
openvswitch_db tests have been backported from devel to stable-2.3[1],
but the role to prepare_ovs_tests was missing from the backport, hence
the test, when run complained about missing roles.

This commit aims to bring this directory into stable-2.3 tree.

[1] https://github.com/ansible/ansible/pull/26330
2017-07-03 10:02:07 +02:00
John R Barker
94660f792a Add openvswitch_db tests (#26330)
openvswitch_db tests were added during 2.4 development, though the
module still existed in 2.3, so backport the tests.

This is needed for distributed-ci.
2017-07-02 21:59:07 +01:00
Matt Davis
6cca156fde re-enable non-pipelined mode for Powershell (#26124)
* fixes #23986
* fixes 3rd-party Windows connection plugins that don't support pipelining (eg awsrun)

(cherry picked from commit 6677559c698f15c582fba80d866f46458848f974)
2017-06-26 22:57:59 -07:00
Matt Clay
940a78c5ba Update FreeBSD pg test to use postgresql95-server.
The py-psycopg2 package now requires postgresql95-server instead of
postgresql93-server. Installing py-psycopg2 will automatically remove
postgresql93-server if it is installed, breaking integration tests.

(cherry picked from commit 15beaed6bc)
2017-06-26 13:54:40 -07:00
John R Barker
cac3cfa9eb MySQL Password updates (#25825)
* MySQL Password updates

* Disable user_password_update_test

(cherry picked from commit 448efdb9e5)
2017-06-19 16:22:37 -07:00
John R Barker
a40b1c455d Use stronger password for MySQL (#25821) (#25822)
Previously we were getting "Your password does not satisfy the current policy requirements"
Possibly caused by a software update on Fedora
(cherry picked from commit 7ee7fa7332)
2017-06-17 13:12:30 +01:00
Robin Roth
5ebaaf26bb Reenable git tests (#25341)
* Revert "Temporarily disable failing git test."
* Use correct hash for depth=1 test

(cherry picked from commit 8f7c8ef3a5)
2017-06-05 12:21:53 +08:00
Matt Clay
dd5dde6c0e Temporarily disable failing git test.
(cherry picked from commit dab1b1fe5b)
2017-06-04 20:42:20 +08:00
Ricardo Carrillo Cruz
8bfc36db6e Add missing provider on basic-motd IOS test (#25307)
Without this it fails, as it needs elevated privs.
(cherry picked from commit ffc74fdca2)
2017-06-02 17:07:06 +02:00
Matt Clay
da8963d788 Temporary work-around for setuptools 36.0.0 bug. (#25243)
* Temporary work-around for setuptools 36.0.0 bug.
* Use older setuptools for pip integration test.
* Limit isort version to avoid new test failures.

(cherry picked from commit 9d8aa43c67)
2017-06-01 12:14:24 -05:00
Ricardo Carrillo Cruz
ec545d7b42 Add provider param to prepare_iosxr_tests role tasks (#25163)
This will avoid passing -u -k to ansible-playbook
(cherry picked from commit 69efb61008)
2017-06-01 12:14:23 -05:00
John R Barker
d07ab49904 Update main.yml 2017-06-01 12:14:23 -05:00
bengerman13
f9d781bcab add xattr integration tests to ci (#24950)
* add xattr integration tests to ci

* fix package syntax

* remove unnecessary become, disable xattr for bsd and osx

(cherry picked from commit 4b6db5db7c)
2017-06-01 12:14:21 -05:00
bengerman13
081e98739e add integration tests for xattr module (#24947)
* add integration tests for xattr module

* fix whitespace

(cherry picked from commit 25aac6151f)
2017-06-01 12:14:21 -05:00
kkjang
dd20427db9 Fix expect for python 3 (#24912)
* Fix expect for python 3

- Change generator next to python 3 compatible
- Added tests for expect

* Add pexpect to integration.txt

- add pexpect library to requirements for integration tests

* Use ansible_python_interpreter in integration tests for expect

* Use double-quotes for expect integration tests

* Cast user input to string for expect integration tests

* Cast user input to string earlier in expect integration tests

* Use ansible.module_utils.six.moves input for expect integration tests

* Fix yamllint errors in the expect test

* Use cat to trigger timeout for expect integration tests

* Use realpath filter in expect integration tests

(cherry picked from commit daada2000c)
2017-06-01 12:14:21 -05:00
jhawkesworth
8d0ea29df0 Added win_copy recursive integration test with trailing path separator. (#24523)
This is a reproducer for https://github.com/ansible/ansible/issues/23559

Tests will fail until https://github.com/ansible/ansible/pull/23581 is merged

Note that I believe another commit is also needed for this to work,
specifically the change from: https://github.com/ansible/ansible/pull/23326
(cherry picked from commit b46c098581)
2017-05-23 11:05:41 -07:00
pdasilva
daf2b5e5fb Changed assemble_from_fragments to use os.path.join (#24909)
Fixes #19437
(cherry picked from commit f8e47e2204)
2017-05-22 15:42:17 -07:00
Matt Davis
5f0be9dcd0 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
(cherry picked from commit ead23783be)
2017-05-09 11:23:05 -07:00
Toshio Kuratomi
af018b75f0 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

(cherry picked from commit 3428f42120)
2017-05-01 08:57:31 -07:00
Nathaniel Case
b4380432f6 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

(cherry picked from commit fc0bf87c20)
2017-04-27 11:09:38 -04:00
Brian Coca
d1c14e8aa4 moved to exceptions for basic skip/fails
better handling of checkmode and async
fix test to follow new flow control

(cherry picked from commit e29dc49a49)
2017-04-25 14:51:22 -04:00
Brian Coca
0878f45a6c 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

(cherry picked from commit 4594bee65a)
2017-04-21 16:09:48 -04:00
Ricardo Carrillo Cruz
81efc176f4 Add missing provider to eos_banner basic-motd eapi test (#23396)
Otherwise this stalls and timeouts, it doesn't have creds to run.
(cherry picked from commit 2cc2b8fb4d)
2017-04-20 10:57:54 +02:00
Ricardo Carrillo Cruz
a769f0b0f4 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

(cherry picked from commit 13b2f11139)
2017-04-20 10:57:05 +02:00
Adrian Likins
32be9a9273 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

(cherry picked from commit ae3d7fb29e)
2017-04-18 13:08:59 -04:00
Matt Martz
b96407be86 Extra deps needed for building cryptography
(cherry picked from commit ac61f09203)
2017-04-13 11:27:30 -07:00
Matt Martz
bdf46e928f Fallback to old ssl_wrap_socket
(cherry picked from commit 13ac993d25)
2017-04-13 11:27:30 -07:00
Matt Martz
9acba3fa68 Update install deps for SNI tests
(cherry picked from commit b4b76bab14)
2017-04-13 11:27:30 -07:00
Brian Coca
e1c1c19a9b added test emulating #23180 use case
(cherry picked from commit 8382ed7200)
2017-04-13 11:01:34 -04:00
Chris Alfonso
292ee29275 Fixes loginBanner plucking over eapi transport when loginBanner isn't set. (#23368) 2017-04-06 11:02:01 -06:00
Nathaniel Case
e2a1ea09dc 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.
(cherry picked from commit 98c23a3342)
2017-04-06 12:27:06 -04:00
Ricardo Carrillo Cruz
5e09ddb6a4 Fix eapi basic-login asserts (#23318)
The asserts where not checking the commands sent to the device
(cherry picked from commit 4571ff0b52)
2017-04-05 20:39:59 +02:00
Ricardo Carrillo Cruz
ebda0bebfc Fix basic-login eapi tests for eos_banner (#23304)
We should be passing the provider dict, not the transport.
(cherry picked from commit d268471739)
2017-04-05 20:02:37 +02:00
Ricardo Carrillo Cruz
6969bef70a Fix asserts on ios_banner tests (#23315)
The contain assert was broken.
(cherry picked from commit cf30f0f27d)
2017-04-05 20:02:24 +02:00
John R Barker
7941f1ede7 enable ios_facts tests again (#23310) (#23312)
(cherry picked from commit f22702eee2)
2017-04-05 17:58:44 +01:00
Nathaniel Case
50500332ae 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

(cherry picked from commit d890167575)
2017-04-05 11:48:28 -04:00
Matt Clay
08be1ae562 Fix integration aliases.
(cherry picked from commit b7cc4616b1)
2017-04-03 17:50:18 -07:00