Commit graph

3590 commits

Author SHA1 Message Date
Brian Coca
0d57282a1a remove extra fields from debug output
fixes #35493

updated tests

(cherry picked from commit a79378fccb)
2018-03-01 12:06:40 -05:00
Trishna Guha
92cea82a4e
vyos_l3_interface fix (#36721)
* vyos_l3_interface fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* update test and changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-27 08:52:37 +05:30
Matt Clay
2d05ecb26c Temporarily disable subversion test on osx.
(cherry picked from commit f283edcb19)
2018-02-26 13:26:35 -08:00
Matt Martz
668a17cfba
Backport #36602 for stable-2.4 (#36607)
* Start of tests for modify_module, specifically to ensure proper shebang replacement on old style modules (#36602)

(cherry picked from commit a7062b7587)

* Modify test to work on 2.4 due to lacking templar kwarg
2018-02-22 17:52:47 -06:00
Deepak Agrawal
3b0686ffe8
vyos_config IndexError in sanitize_config (#36375) (#36566)
* Bug in del(list) logic. Say you have a list of 4 elements a[0-3]
and you have to remove index 1 and 3, if you remove index 1 first
then list is cut short a[0-2] and does not have index 3

Fix: Remove indexes in reverse sorted order e.g. 3 and 1 in above
example so that order of indexes remain preserved even after deleting

fix is to remove indexes in reverse sorted order

* Add test cases for failed case

(cherry picked from commit 0bbea9a579)
2018-02-22 20:20:49 +05:30
Sam Doran
23289bd2f2 Check for regexp match when using insertbefore or insertafter (#36474)
Add tests to cover this scenario
Fixes #36156

(cherry picked from commit 723daf3e3a)

# Conflicts:
#	lib/ansible/modules/files/lineinfile.py
2018-02-21 17:06:27 -05:00
David Newswanger
a98700917f added support for --testcase flag in ansible-test (#36134)
* added support for --testcase flag in ansible-test

* fixed command format

* added tab completion

* fixed sanity issues

* added documenation for --testcase

* don't autocomplete when multiple modules are selected

(cherry picked from commit 3f5caf659e)
2018-02-19 09:01:38 -08:00
Trishna Guha
7c4e343864
networking fix cherry-pick (#35936)
* Add minor conditional checks to nxos_bgp sanity test (#35476)

* Add minor conditional checks to nxos_bgp sanity test

* Make ansibot happy

(cherry picked from commit 5a198e1e6a)

* fixing the removed_in_version to 2.6. (#35853)

(cherry picked from commit 73650cf854)

* fix eos_config second-level indent idempotece (#35588)

* fix eos_config second-level indent idempotece

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* address ganeshrn's comment - update doc

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit b30f3b9f4d)

* update CHANGELOG

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-09 11:37:02 +05:30
Matt Clay
61fe2efa48 Temp install of setuptools for import coverage. (#35752)
(cherry picked from commit f46f6c8dec)
2018-02-06 14:04:43 -08:00
Sam Doran
ed5a73251b Fix lineinfile to insert line when pattern exists elsewhere in the file. (#33393)
* Insert lines before or after when the regexp exists elsewhere in the file

* Correct filter syntax in lineinfile integration test

* Use multi-line YAML syntax on lineinfile tests

Unify indentation

* Add lineinfile tests for same line matched to different regexps

* Remove debug statement from test

(cherry picked from commit f8f2b6d61d)
2018-02-05 17:34:40 -05:00
Matt Clay
feea6425f3 Fix pip integration test.
(cherry picked from commit ea70b49b11)
2018-01-31 23:27:31 -08:00
Toshio Kuratomi
475cc33546 Revert "Add test for fix using loop_control with delegate_to (#33809)"
This reverts commit adf8927c74.

This test uses features not found in ansible-2.4
2018-01-31 19:54:11 -08:00
Martin Krizek
adf8927c74 Add test for fix using loop_control with delegate_to (#33809)
(cherry picked from commit 5c7f203c33)
2018-01-31 17:37:33 -08:00
Matt Martz
32ddcf96df Recursively remove args with omit as as their value, to match suboptions in argument_spec (#35299)
* Recursively remove args with omit as as their value, to match suboptions in argument_spec

* Add test for the new remove_omit function

(cherry picked from commit 7404dc6767)
2018-01-31 17:31:52 -08:00
Yuwei Zhou
6b26ca183d delete subnet should be idempotent (#35037)
(cherry picked from commit 7c201fc9bc)
2018-01-31 17:31:51 -08:00
Matt Martz
2924ad1bbf Don't skip an inventory source just because it has a comma (#35002)
* Don't skip an inventory source just because it has a comma, make sure it's also doesn't exist as a path. Fixes #34931

* Add integration test for inventory path with commas

(cherry picked from commit 1ac04ba52e)
2018-01-31 17:31:51 -08:00
Trishna Guha
128ee6f48f fix conflict nxos tests (#35078)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-01-31 17:31:51 -08:00
saichint
d16b5c23c9 fix vxlan idempotent issue (#34750)
(cherry picked from commit c04cd8642d)
2018-01-31 17:31:51 -08:00
Trishna Guha
31519edee6 Enable nxapi nxos_banner test (#35033)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 8a6d699198)
2018-01-31 17:31:51 -08:00
saichint
49df1fbafd Fixes for nxos_bgp (#34590)
* fix bgp issues

* add new tests cases

* review comments

(cherry picked from commit 6f8d3ad70d)
2018-01-31 17:31:51 -08:00
saichint
c11c35e32a fix for nxos_vxlan_vtep_vni issues (#34946)
* fix vxlan_vtep_vni issues

* pep8 errors

(cherry picked from commit 3a144b290d)
2018-01-31 17:31:51 -08:00
Trishna Guha
968e048b0d Idempotency test for enabled mode nxos_udld_interface (#35031)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit f806a58a5e)
2018-01-31 17:31:51 -08:00
Jordan Borean
159b0f628d copy tests: only create recursive symlink in tests (#35073)
(cherry picked from commit 9106284c1c)
2018-01-31 17:31:51 -08:00
Jordan Borean
1ddd9dabd8 win_script: fix large args and misc errors in wrapper 2018-01-31 17:31:51 -08:00
Matt Clay
75da39fbce Fix failing zypper_repository integration test.
(cherry picked from commit b1d14d5b06)
(cherry picked from commit 9c0cf0eafa2a7218976d64918ad3f2084580f8aa)
2018-01-25 15:34:32 -08:00
Toshio Kuratomi
055cae3c0f Revert "Integration tests for import/include (#33418)"
This reverts commit 8c822018db.

There's some other bugs in 2.4's import/include that aren't blockers for
2.4.3 (becaues they aren't regressions) that prevent the new integration
tests from passing.  Revert the integration tests.
2018-01-20 13:34:45 -08:00
Sam Doran
8c822018db Integration tests for import/include (#33418)
* First pass at include_role tests

* Reorganize test structure

Do all import and include tests in a single target.

* Build out more tests and test with linear and free strategy for each type

* import_role tests

* Set target host for play test

* Basic import_playbook tests

* Basic import/include_tasks tests

* Add recursion test

* import_playbook tests

* Add import_playbook group_vars test

Issue #33177

* Additional group_var tests for import_playbook

* Enable recursion test

* More work on import_tasks

* Run all tests via run.sh, improve conditional tests, add never tag

Add never tag to certain failining tests and explicitly skip it for now until #34104 is merged. Some tasks need to remain commented out because they cause the entire play to fail and aren't skippable by tags because they are syntax and/or variable checks.

Improve test for whether or not a role was run based on a conditional. Since the [import|include]_role does not register a variable, use a variable that is set inside a role as a canary test for whether or not the role was run.

* Use a fail task rather than trigger a failure via bogus command

This should resolve the "unstable" test results.

* Import tag tests

Fix bug it tests where validate tasks weren't run on tag tests.
Add tests for task import/include with tags.

* Remove test for playbook group_var inheritance

(cherry picked from commit 10a8c6bc25)
2018-01-19 08:24:31 -08:00
Matt Martz
bd4b92c0b6 Ensure that the become password is written on py3 in the ssh connection plugin. Fixes #34727
(cherry picked from commit 29c1d5cb5d)
2018-01-19 08:06:07 -08:00
Toshio Kuratomi
649ffc10a2 Revert "Ensure that the become password is written on py3 in the ssh connection plugin. Fixes #34727"
This reverts commit fb9e7a85b3.

We may not have a 2.4.3rc3 so reverting this for now
2018-01-18 19:42:24 -08:00
Matt Martz
fb9e7a85b3 Ensure that the become password is written on py3 in the ssh connection plugin. Fixes #34727
(cherry picked from commit 29c1d5cb5d)
2018-01-18 09:33:08 -08:00
James Cammarata
f1c458303a Backport of b107e397 (Cache tasks as they are queued)
* Cache tasks as they are queued instead of en masse

This also moves the task caching from the PlayIterator to the
StrategyBase class, where it makes more sense (and makes it easier
to not have to change the strategy class methods leading to an API
change).

Fixes #31673

* Cleaning up unit tests due to 502ca780

(cherry picked from commit b107e397cb)
2018-01-15 10:04:08 -08:00
Matt Davis
79d1ba35ad
Cherrypick misc Azure test fixes (#34713)
* Fix test case failure for Azure ACS module (#33623)

* fix azure acs test failure

* change acs location

(cherry picked from commit 8e20ae2de4)

* fix azure test case failure for function apps module (#33658)

(cherry picked from commit f8d7e477f0)

* Fix storage endpoint for Azure Stack (#33946)

* Fix storage endpoint for Azure Stack

https://github.com/Azure/msrestazure-for-python/issues/64

* corrected visual indentation

(cherry picked from commit 6643fe821e)

* Fix incorrect formatting call in azure module (#33561)

Fix corrects formatting call in azure_rm_resourcegroup_facts module.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 6654d69569)
2018-01-10 13:27:52 -08:00
Matt Davis
6f679b45de cherry-pick #34442 2018-01-09 23:29:31 -08:00
Matt Clay
02b1d90cf3 Make xattr test conditional on feature support.
(cherry picked from commit 77726b471f)
2018-01-08 23:57:50 -08:00
Jordan Borean
9a5bca5668 fix windows tests after recent patch (#34548)
(cherry picked from commit 460deb08cb)
2018-01-07 14:09:25 +10:00
James Cammarata
0b7d78d67f
Don't use getattr in _get_parent_attribute to avoid recursion issues (#33595) (#34532)
* Don't use getattr in _get_parent_attribute to avoid recursion issues

Fixes #23609

* Move extend/prepend to field attribute

Also removes _get_attr* methods that were basically just calling
_get_parent_attribute because it needed to set those params.

Also modifies _get_parent_attribute() to pull those values from the
FieldAttributes instead of using the ones passed into the function.

* Better fixes for _get_parent_attribute
2018-01-05 23:20:47 -06:00
Toshio Kuratomi
1546ddb3c3 Fix up the test-set_mode_if_different unittests 2018-01-04 21:05:38 -08:00
Jordan Borean
cb92c4bea1 win_package: remove case sensitive check for msi extension (#34476)
(cherry picked from commit da69f5aeae)
2018-01-05 07:13:18 +10:00
Matt Davis
3a853fc9b8 fix win_firewall test failure on 2008/2008r2 (#34391)
* ensure that "starting" profile is known instead of relying on default
2018-01-03 05:36:40 -05:00
Matt Davis
cbc07cf9cc backport win_firewall_rule updates
from devel  SHA 89d9444ad560ef5c4a8aac911e2e7abcf7aa9c76
2018-01-02 20:38:00 -08:00
Trishna Guha
284625f18c
NXOS Commit Integration tests to Ansible (part 2) (#28939) (#33964)
* add nxos_aaa_server IT

* add nxos_aaa_server_host ITs

* Add nxos_gir IT

* Add nxos_gir_profile_management IT

* add newly added tests to nxos.yaml

* fix nxos.yaml indentation

* fix indentation again

* skip nxos_git_profile_management IT for titanium

* change idempotency to non-idempotency check

(cherry picked from commit a130549ead)
2017-12-16 10:10:19 +05:30
Maxime de Roucy
86fbaffc07 fix file attributes changed detection
https://docs.python.org/2/library/stdtypes.html#str.split
str.split([sep[, maxsplit]])
If sep is given, consecutive delimiters are not grouped together and are deemed
to delimit empty strings.

>>> "85563      ----------------C-- /var/lib/libvirt/images".split(' ')[0:2]
['85563', '']
>>> "85563      ----------------C-- /var/lib/libvirt/images".split()[0:2]
['85563', '----------------C--']

(cherry picked from commit c2ac9d0831)
2017-12-15 09:50:29 -08:00
Jordan Borean
5dd40349b2 win_iis_webapppool: stop any passwords from being returned (#33931)
(cherry picked from commit 0ca828ebab)
2017-12-15 09:52:52 +10:00
Ganesh Nalawade
2a007e2b4d
Fix ios_interface integration test failure (#33901) 2017-12-14 14:17:08 +05:30
Ganesh Nalawade
13937ce772
ios_config save (#33791) (#33872)
* Fixing save so it still works. Adding changed as an option for save_when.

* Updating unit tests.

* Updating description to state that changed was added in 2.5.

(cherry picked from commit 3a9083cf48)

* Update Changelog
2017-12-13 22:31:09 +05:30
Matt Martz
926dfb7c04 Add test for clean_copy preservation of keys
(cherry picked from commit 5c63bb0090)
2017-12-12 14:27:41 -06:00
Toshio Kuratomi
109471cb7f Remove files from legacy that pass now that W503 is ignored 2017-12-08 11:28:39 -08:00
John R Barker
c7a903c34b Ignore W503 in stable-2.4 (#33716)
* Ignore W503

To avoid backporting from devel (2.5) to 2.4 any code that may fail pep8
backport the current-ignore change.
2017-12-08 10:45:10 -08:00
s-hertel
6a6ae0cede loop doesn't exist in 2.4 2017-12-08 09:53:51 -08:00
Sloane Hertel
f2bf74991e Fix using loops with environment and add tests (#32796)
(cherry picked from commit 7bb35e8781)
2017-12-08 07:22:11 -08:00