You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test
Virgil Dupras bf48383610 Fix regression in jinja2 include search path (#18617)
* 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
8 years ago
..
integration Fix regression in jinja2 include search path (#18617) 8 years ago
samples Fix cosmetic problems in YAML source 8 years ago
sanity Add a check for type() instead of isinstance() (#18439) 8 years ago
units Add lots of test cases to inventory/test_host.py (#17827) 8 years ago
utils Update network-test-runner.sh (#18672) 8 years ago
README.md Test reorganization and cleanup. (#18270) 8 years ago

README.md

Ansible Test System

Folders

units

Unit tests that test small pieces of code not suited for the integration test layer, usually very API based, and should leverage mock interfaces rather than producing side effects.

Playbook engine code is better suited for integration tests.

Requirements: sudo pip install paramiko PyYAML jinja2 httplib2 passlib nose mock

integration

Integration test layer, constructed using playbooks.

Some tests may require cloud credentials, others will not, and destructive tests are separated from non-destructive so a subset can be run on development machines.

learn more

hop into a subdirectory and see the associated README.md for more info.