summaryrefslogtreecommitdiff
path: root/test/integration/targets/lookups
Commit message (Collapse)AuthorAgeFilesLines
* [stable-2.9] Fix url lookup test to use test container (#80284). (#80290)Matt Clay2023-03-231-1/+1
| | | (cherry picked from commit 054aa9215857f376ee4d387339e6b82bcc14b437)
* [2.9] Handle post_validate templating errors and add tests (#70240) (#70390)Sloane Hertel2020-07-172-0/+33
| | | | | | | | | | | | | | | * Handle post_validate templating errors and fix tests (#70240) * Handle unexpected templating errors * Fixes #70050 Fix up tests that weren't running and add tests for graceful templating error handling (cherry picked from commit 30e70f4b6356e692c7ade3dd95f2e55d07f3e8f5) * changelog ci_complete
* [stable-2.9] Properly handle unicode in safe_eval (#68576) (#69626)Sam Doran2020-06-103-0/+15
| | | | | | | | | | | | | | * Properly handle unicode in safe_eval Fixes #66943 * Update lib/ansible/template/safe_eval.py Co-authored-by: Sam Doran <sdoran@redhat.com>. (cherry picked from commit ecd986006ededd3ecfd4fb6704d7a68b3bfba5e1) Co-authored-by: Martin Krizek <martin.krizek@gmail.com> Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
* template lookup: fix regression when templating hostvars (#64070)Martin Krizek2019-11-124-0/+14
| | | | | | | | | | | This fixes a regression that was caused by switching from copy() to deepcopy() when 'saving' variables before templating. Since HostVars did not implement the __deepcopy__() method, deepcopy returned incorrect results when host vars were present in the variables. Fixes #63940 (cherry picked from commit cd8ce16d4830782063692d897e57bd0af33ab5db)
* Clean up various integration tests. (#60613)Matt Clay2019-08-143-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * Fix var_blending test temp dir usage. * Fix filters integration test: - Fix use of `output_dir`. - Use `localhost` instead of `testhost` since we're only testing filters. - Fix `fileglob` test to actually test a directory that exists. * Fix lookups integration test: - Fix use of `output_dir`. - Use `localhost` instead of `testhost` since we're only testing lookups. * Fix ansible-runner test temp dir usage. * Fix template and template_jinja2_latest test. Use the `OUTPUT_DIR` env var to get the output directory for the tests. * Fix Python version compat in filters test. * Skip filters test on Python 2.6.
* Fix incorrect assumptions in integration tests. (#58365)Matt Clay2019-06-251-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix nested template test. There were two issues with the previous implementation: 1. The LOGNAME environment variable may not be set. 2. The comparison assumed that testhost is localhost. * Fix variable display for cartesian lookup test. * Fix vars list test. The test assumed that the ansible_user variable is always set, which is not guaranteed when using connections other than local. * Fix supervisorctl integration test. Use ansible_user_id instead of ansible_user since ansible_user is not guaranteed to be available when the connection is not local. * Fix file integration test. Use ansible_user_id instead of ansible_user since ansible_user is not guaranteed to be available when the connection is not local. * Fix expect integration test. Do not assume module_utils is available for utility scripts. * Fix python_requirements_info integration test. Check for pip instead of ansible, since ansible is not guaranteed to be installed when using a connection other than local. * Fix ansible-runner integration test. Use implicit localhost to run the test since it requires access to the ansible installation currently being tested. * Fix tower_common integration test. Accept errors on stdout or stderr. * Fix tower_user integration test. Recognize errors on stdout or stderr.
* cert validation fixes - Attempt 2 (#55953)Matt Martz2019-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Attempt 2 of cert validation fixes * Remove unused code * Cleanup the tmp cert using atexit * Fix linting issues * Only add SSLValidationHandler when not HAS_SSLCONTEXT * Catch value errors on non PEM certs * Only catch NotImplementedError to avoid masking issues * set self._context even with PyOpenSSLContext for conformity * Fix error building * normalize how we interact with the context we create * Remove unused code * Address test for py3.7 message difference * open_url should pass the ca_path through * Account for new error in url lookup test * Guard some code behind whether or not we are validating certs * Make _make_context public * Move atexit.register up to where the tmp file is created
* Fix tests which assume `virtualenv` is available.Matt Clay2019-03-271-3/+2
|
* Use virtualenv for filters and lookups tests.Matt Clay2019-03-271-0/+3
|
* Allow for vaulted templates in template lookup (#49819)Martin Krizek2019-01-074-0/+22
| | | Fixes #34209
* Add support for variable_{start,end}_string (#49711)Abhijeet Kasurde2018-12-112-16/+14
| | | | | | Template lookup plugin now support variable_start_string and variable_end_string, just like template module. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Update Shippable integration test groups. (#43118)Matt Clay2018-07-231-1/+1
| | | | | | | * Update Shippable integration test groups. * Update integration test group aliases. * Rebalance AWS and Azure tests with extra group. * Rebalance Windows tests with another group.
* Move lookups tests to group1.Matt Clay2018-05-091-1/+1
|
* Overhaul httptester support in ansible-test. (#39892)Matt Clay2018-05-091-0/+1
| | | | | | | - Works with the --remote option. - Can be disabled with the --disable-httptester option. - Change image with the --httptester option. - Only load and run httptester for targets that require it.
* Revert "remove query/q (#36315)"Toshio Kuratomi2018-02-211-1/+1
| | | | | | This reverts commit b47d2e07e15a8a15307f146e0c12e70e5e4ca0cd. query is a feature for 2.5. We're not reverting it now.
* remove query/q (#36315)Brian Coca2018-02-211-1/+1
| | | | | | | | * remove query/q remove and fixed tests for removed func * paren fix
* Rename var lookup to vars and add testsToshio Kuratomi2018-02-081-0/+19
|
* Deprecate tests used as filters (#32361)Matt Martz2017-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Warn on tests used as filters * Update docs, add aliases for tests that fit more gramatically with test syntax * Fix rst formatting * Add successful filter, alias of success * Remove renamed_deprecation, it was overkill * Make directory alias for is_dir * Update tests to use proper jinja test syntax * Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax * Add conversion script, porting guide updates, and changelog updates * Update newly added uses of tests as filters * No underscore variable * Convert recent tests as filter changes to win_stat * Fix some changes related to rebasing a few integration tests * Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name * Add test for tests_as_filters_warning * Update tests as filters in newly added/modified tests * Address recent changes to several integration tests * Address recent changes in cs_vpc
* Fix github_issue test and enable in CI.Matt Clay2017-09-011-1/+1
|
* Add Fedora Python 3 Docker images and fix tests. (#27794)Matt Clay2017-08-041-12/+7
| | | | | | | | | | | | | | * Add new Fedora docker images with Python 3. * Use consistent env var for lookup test. * Fix testing of virtualenv with Python 3. * Fix docker_secret tests on Fedora 26. * Add Python 3 support to Fedora postgresql test. * Add Python 3 support to Fedora mysql tests. * Fix uri test server for Python 3 on Fedora. * Fix iso_extract test for Python 3 on Fedora. * Add Python 3 support for Fedora to openssl tests. * Fix dnf group test for Python 3 on Fedora. * Use force with user deletion in become test.
* Install passlib before starting lookups test.Matt Clay2017-07-072-0/+13
|
* Make password lookup treat /dev/null as a special caseMichael Scherer2017-02-151-0/+12
| | | | | | | | | I have from time to time a need of random password without wanting to write them down (one example is mailman list creation, that requires a password to be given to be sent to the list owner). But using /dev/null do not return null, but the empty string, which doesn't generate a password at all and so do not achieve my use case.
* Initial ansible-test implementation. (#18556)Matt Clay2016-11-291-0/+1
|
* Fix regression in jinja2 include search path (#18617)Virgil Dupras2016-11-293-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix regression in jinja2 include search path Since commit 3c39bb5, the 'ansible_search_path' variable is used to set jinja2's search path for {% include %} directives. However, this path is the the proper one because our templates live in 'templates' subdirs in our search path. This is a regression because previously, our include search path would include the dirname of the currently interpreted file, which worked most of the time. fixes #18526 * Fix template lookup search path Improve fix in commit c96c853 so that the search path contain both template-suffixed paths as well as original paths. ref PR #18617 * Add integration test for template lookups Tests regression at #18526 This test fails on current devel branch and succeeds on PR #18617
* Fix cosmetic problems in YAML sourceAdrien Vergé2016-11-112-6/+5
| | | | | | | | This change corrects problems reported by the `yamllint` linter. Since key duplication problems were removed in 4d48711, this commit mainly fixes trailing spaces and extra empty lines at beginning/end of files.
* Migrate Linux CI roles to test targets. (#17997)Matt Clay2016-10-133-0/+283