Commit graph

25 commits

Author SHA1 Message Date
Martin Krizek
59a240cd31
Fix with_dict/with_list being passed incorrect type tests ()
These tests were failing due to a variable passed being undefined
instead of being of an incorrect type which is the actual
intent of the tests.
2020-09-11 07:53:10 +02:00
Matt Martz
7c60dadb9a
Updates to Integration tests to pass against Alpine ()
* Start of alpine testing

* More updates

* Add forgotten file

* remove debug

* Add alpine3

* equal

* group 4

* group 4

* group 5

* Try to decrease test length

* libuser only available in testing

* Remove debug

* Make loops target work on hosts without gnu date

* Enable alpine testing

* ci_complete

* Don't specify uid for creating test user

* ci_complete

* Re-sort docker completion

* use newer container image

* ci_complete

* fix indentation

Co-authored-by: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Clay <matt@mystile.com>
2020-08-07 14:28:10 -05:00
Yanis Guenane
4fd2dce7f3
Testing: Add support for AIX platform () 2020-01-29 15:56:51 -08:00
Matt Martz
254788bc22
unsafe wrapping should only happen for with_ loops ()
* unsafe wrapping should only happen for with_ lookups. Fixes . Addresses 

* edit porting guide entry

* typo in changelog fragment

* typo

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* punctuation

Co-Authored-By: Sandra McCann <samccann@redhat.com>
2019-11-06 10:31:55 -06:00
Martin Krizek
1010363c0b
Preserve original variables when using a loop ()
Fixes 
2019-07-24 11:35:14 +02:00
Martin Krizek
7346b699ee
Use templated loop_var/index_var when looping include_* ()
Fixes 
2019-07-10 13:49:24 +02:00
Matt Martz
6996926d89
Expose loop_control.loop_var as ansible_loop_var ()
* Expose the loop_var as ansible_loop_var

* Add docs

* fix assert test

* Indicate version added
2019-03-26 11:07:54 -05:00
Brian Coca
b793f08a92
fixes for stripping ()
function changed to do in place replacement, should be less expensive even with copy as it avoids 'sub copies', can compose with module_args_copy to create replacement for old behavior

  attempt to fix 

* handle lists and subdicts correctly
* added  missing exception case, which was not noticed since 'cleaning' was not working
* added comments to clarify exceptions
2019-03-12 18:18:38 -04:00
Brian Coca
30da7a363c
allows loop pause for subseconds ()
* allows loop pause for subseconds
* skip test on os x and bsd since date commands lacks nano

fixes 
2019-01-18 22:41:29 -05:00
Matt Martz
9007dbec2f
Add info about loop based on jinja2 loop var ()
* Add info about loop based on jinja2 loop var

* ansible_loop

* Update test count

* Add extended loop_control that defines whether ansible_loop should be added

* Extended needs to be defaulted

* Revert "Update test count"

This reverts commit f1e93ee469825f4cdcd90fb28667d29aa088275c.

* Add docs about loop_control.extended

* Add revindex and revindex0

* Document ansible_loop in special vars

* Add changelog fragment

* Add tests, change items to allitems so that dot notation works, fix logic error with previtem
2018-12-07 13:49:50 -06:00
Matt Martz
f6ecdf0b87
Handle sets differently than lists in wrap_var. Fixes () 2018-10-23 11:18:21 -05:00
Toshio Kuratomi
ccabc2bff5 Revert "[stable-2.7] Handle sets differently than lists in wrap_var. Fixes #47372."
This reverts commit 0e933f76ba.

The tests for this were broken on centos6 because jinja2 does not have
a map filter on that platform.  Tests need to be rewritten
2018-10-22 21:00:15 -07:00
Matt Martz
c58de75f38 Handle sets differently than lists in wrap_var. Fixes 2018-10-22 11:56:28 -04:00
Matt Martz
02f4d0a57f
Ensure that an empty literal list with loop skips the task () 2018-10-16 13:35:10 -05:00
Matt Martz
2ac647def8
Ensure loop with delegate_to can short circuit the same as without delegate_to. Fixes () 2018-09-07 10:16:03 -05:00
Matt Martz
a7f45c0660 Add basedir to ansible_search_path before running loops. Fixes () 2018-07-31 11:51:32 -04:00
Matt Clay
4e489d1be8
Update Shippable integration test groups. ()
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
2018-07-23 20:46:22 -07:00
Adam Miller
98a198a777
Handle incorrect data type in list lookup plugin ()
handle incorrect data type in list lookup plugin
Fixes 
test to ensure that loops properly handle incorrect datatypes

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-05-17 15:29:36 -05:00
Toshio Kuratomi
03a6d72633 Revert "remove query/q ()"
This reverts commit b47d2e07e1.

query is a feature for 2.5.  We're not reverting it now.
2018-02-21 10:37:51 -08:00
Brian Coca
b47d2e07e1
remove query/q ()
* remove query/q

remove and fixed tests for removed func

* paren fix
2018-02-21 10:42:54 -05:00
Martin Krizek
9fced4f0a9
Add integration test for () 2018-02-21 16:16:02 +01:00
Andrew Gaffney
e9b0a4ccb4 Add support for defining index var for task loops 2018-02-05 22:14:05 -05:00
Toshio Kuratomi
e8cfe05e37 Test behaviour of loop keyword plus lookup plugins
We introduced the new loop keyword as a replacement for with without
adding tests that it behaved as we expected.  This test asserts that
behaviour.

Incidentally, it also shows how to use parameters with lookups and loops
now.
2018-01-31 13:55:49 -08:00
Matt Clay
6bbd92e422 Initial ansible-test implementation. () 2016-11-29 21:21:53 -08:00
Matt Clay
75e4645ee7 Migrate Linux CI roles to test targets. () 2016-10-13 09:09:25 -07:00