Commit Graph

2302 Commits (121941635d87f00a3d39c773fcdb0eea5d18cbc5)

Author SHA1 Message Date
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)
9 years ago
bengerman13 081e98739e add integration tests for xattr module (#24947)
* add integration tests for xattr module

* fix whitespace

(cherry picked from commit 25aac6151f)
9 years ago
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)
9 years ago
Toshio Kuratomi c57e5e1305 Remove vertica_schema from the pep8 legacy files 9 years ago
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)
9 years ago
pdasilva daf2b5e5fb Changed assemble_from_fragments to use os.path.join (#24909)
Fixes #19437
(cherry picked from commit f8e47e2204)
9 years ago
Matt Clay 3a6fd9448e Limit sphinx version on python 2.6. (#24678)
* Limit sphinx version on python 2.6.
* Fix issues identified by rstcheck.

(cherry picked from commit 9178e176b5)
9 years ago
Abhijeet Kasurde 4506da6a6f Fix UnboundLocalError in basic.py
* Fix for UnboundLocalError while accessing deprecations
  in result
* Add Unit test

Fixes #24592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 764b4b20ec)
9 years ago
Brian Coca 1f3f4cf702 deal with null/none connections
fixes #23621
pushed 'connection resolution' to play_context
override fieldattribute getter

(cherry picked from commit c50cf22d52)
9 years ago
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)
9 years ago
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)
9 years ago
Matt Martz 778173ec07 Fix password prompt matching (#24081)
* Fix password prompt matching

* Add some tests for check_password_prompt

* Prevent pep8 line ends with a space error

(cherry picked from commit 040fb4435a)
9 years ago
Toshio Kuratomi 98d223a51b Facts Timeout was not settable via ansible.cfg
The timeout for gathering facts needs to be settable from three places
(highest precedence to lowest):

* programmatically
* ansible.cfg (equivalent to the user specifying it explicitly when
  calling setup)
* from the default value

The code was changed in b4bd6c80de to
allow programmatically and the default value to work correctly but
setting via ansible.cfg/parameter was broken.

This change should fix setting via ansible.cfg and adds unittests for
all three cases

Fixes #23753

(cherry picked from commit d088030fa6)
9 years ago
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)
9 years ago
Matt Clay 126878488f Fix bugs in ansible-test units command. (#24044)
* Handle old versions of coverage.
* Handle old versions of setuptools.
* Detect python version for docker/remote units.
* Add sanity override for test constraints.

(cherry picked from commit d662f6f0db)
9 years ago
Matt Clay 19c4e1a992 Use Shippable image: drydock/u16pytall:master
* Use Shippable image: drydock/u16pytall:master
* Do not install python 3.6 on Shippable.
9 years ago
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)
9 years ago
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)
9 years ago
Ricardo Carrillo Cruz a1c0c1582b Add assertion on test_iosxr_facts (#23852)
We hit bug #23737 due to bad coverage on test_iosxr_facts, we
were not checking memory facts at all.
(cherry picked from commit 60de93c31d)
9 years ago
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)
9 years ago
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)
9 years ago
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)
9 years ago
Nathaniel Case c4b6b87344 nxos_vlan tweaks (#23194)
* Remove commented code

Remove a lot of unnecessary output

* Tests

* Sort vlan ids _after_ running set operations, so order is not lost
(cherry picked from commit 0b4cebfb8b)
9 years ago
Matt Clay 06be3c56a9 Add rstcheck to ansible-test and correct issues. (#23550)
* Add rstcheck to ansible-test.
* Fix rst code-block languages and syntax errors.
* Fix rst inline literals.
* Update python 2 code block to pass tests on py 3.

(cherry picked from commit cb1f57d4e5)
9 years ago
Matt Clay 92bdd13bb1 Fix var precedence check to support python 3. (#23552)
* Fix var precedence check to support python 3.
* Run CI sanity tests using python 3.5.
* Disable pylint non-iterator-returned test to pass on python 3.5.

(cherry picked from commit e7bb508ad6)
9 years ago
Matt Clay 69562c5d20 Fix module validator blacklist handling.
Process the blacklist before creating a validator instance.

(cherry picked from commit 442768c45e)
9 years ago
Lumír 'Frenzy' Balhar 4452429b45 Add Python 3 support for validate-modules test. (#21195)
* Improve PEP8 compatibility

* Fix Python 3 incompatibility

Is prohibited to mutate OrderedDict during iteration through it so
is better to add records with error or warning to empty dictionary
instead of delete records from copy of dictionary during iterating.

* Decode output of subprocess from bytes to unicode.

* Add Python 3 support for validate-modules test.

Fix #18367

(cherry picked from commit 9d41aefd71)
9 years ago
Ryan Brown a256745eae fix validate-module sanity error per https://app.shippable.com/github/ansible/ansible/runs/16493/1/console (#22711)
(cherry picked from commit d791665559)
9 years ago
Matt Clay 345749884d Fix module validation without base branch.
(cherry picked from commit 672e9a2f61)
9 years ago
Matt Clay 5667fe6746 Support module alias and rename validation. (#22675)
Cache git ls-tree output to speed up validation.
(cherry picked from commit 1f337b6421)
9 years ago
Matt Clay 6883cad07e Temporarily cap pylint version < 1.7.0 in tests.
(cherry picked from commit 4ee96b20a3)
9 years ago
Matt Clay 45c2887b19 Fix ansible-test handling of import/syntax errors.
(cherry picked from commit 0cf1e8e061)
9 years ago
Matt Clay 84d5e6e645 Fix errors reported by pylint. (#23282)
* Fix pylint misplaced-bare-raise errors.
* Fix pylint return-in-init error.
* Fix pylint bad-format-character error.
* Fix pylint too-many-format-args errors.
* Fix pylint too-few-format-args errors.
* Fix pylint truncated-format-string error.

(cherry picked from commit 48eeab8a53)
9 years ago
Matt Clay 92c4a3319c Initial pylint support for ansible-test sanity.
(cherry picked from commit 1daa69d685)
9 years ago
Matt Clay f57d0bab32 Set IO encoding for ansible-test on Shippable.
(cherry picked from commit eec01e2137)
9 years ago
Matt Clay a491adc425 Fix ansible-test empty diff handling on Shippable.
(cherry picked from commit 92ad9a19b6)
9 years ago
Matt Martz b96407be86 Extra deps needed for building cryptography
(cherry picked from commit ac61f09203)
9 years ago
Matt Martz bdf46e928f Fallback to old ssl_wrap_socket
(cherry picked from commit 13ac993d25)
9 years ago
Matt Martz 9acba3fa68 Update install deps for SNI tests
(cherry picked from commit b4b76bab14)
9 years ago
Strahinja Kustudić 701a47c850 Ignores ControlPersist broken pipe errors. Fixes #16731
Ansible will now automatically retry a connection if SSH returns an error:

mux_client_hello_exchange: write packet: Broken pipe

This is probably a bug in SSH, but because it's safe to retry this
connection there is no need for Ansible to fail because of it.

(cherry picked from commit 9f0be5a556)
9 years ago
Brian Coca e1c1c19a9b added test emulating #23180 use case
(cherry picked from commit 8382ed7200)
9 years ago
Chris Alfonso 292ee29275 Fixes loginBanner plucking over eapi transport when loginBanner isn't set. (#23368) 9 years ago
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)
9 years ago
John R Barker c6e9039b23 fix iosxr commands to encode json (#23346) (#23355)
the command dict in the iosxr module_utils wasn't encoding the request
to json.  this patch will fix that problem
(cherry picked from commit f0008248d4)
9 years ago
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)
9 years ago
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)
9 years ago
Ricardo Carrillo Cruz 6969bef70a Fix asserts on ios_banner tests (#23315)
The contain assert was broken.
(cherry picked from commit cf30f0f27d)
9 years ago
John R Barker 7941f1ede7 enable ios_facts tests again (#23310) (#23312)
(cherry picked from commit f22702eee2)
9 years ago
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)
9 years ago
Matt Clay 08be1ae562 Fix integration aliases.
(cherry picked from commit b7cc4616b1)
9 years ago