diff options
author | Sam Doran <sdoran@ansible.com> | 2018-01-19 11:23:48 -0500 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2018-01-19 08:23:48 -0800 |
commit | 10a8c6bc2531f1b42509c80bf3b746aacedaec4e (patch) | |
tree | 39ce2f5976992d4a4cfc2e5295b9502a6ade8128 /test/integration/targets/include_import/runme.sh | |
parent | 2697c0e237df22d0af8876f187cb764ec9b0ee06 (diff) | |
download | ansible-10a8c6bc2531f1b42509c80bf3b746aacedaec4e.tar.gz |
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
Diffstat (limited to 'test/integration/targets/include_import/runme.sh')
-rwxr-xr-x | test/integration/targets/include_import/runme.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/integration/targets/include_import/runme.sh b/test/integration/targets/include_import/runme.sh new file mode 100755 index 0000000000..fbe961c574 --- /dev/null +++ b/test/integration/targets/include_import/runme.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +set -eux + +export ANSIBLE_ROLES_PATH=./roles + +## Import (static) + +# Playbook +ANSIBLE_STRATEGY='linear' ansible-playbook playbook/test_import_playbook.yml -i ../../inventory "$@" --skip-tags never +ANSIBLE_STRATEGY='free' ansible-playbook playbook/test_import_playbook.yml -i ../../inventory "$@" --skip-tags never +ANSIBLE_STRATEGY='linear' ansible-playbook playbook/test_import_playbook_tags.yml -i ../../inventory "$@" --tags canary1,canary22,validate --skip-tags skipme,never + +# Tasks +ANSIBLE_STRATEGY='linear' ansible-playbook tasks/test_import_tasks.yml -i ../../inventory "$@" --skip-tags never +ANSIBLE_STRATEGY='free' ansible-playbook tasks/test_import_tasks.yml -i ../../inventory "$@" --skip-tags never +ANSIBLE_STRATEGY='free' ansible-playbook tasks/test_import_tasks_tags.yml -i ../../inventory "$@" --tags tasks1,canary1,validate --skip-tags never + +# Role +ANSIBLE_STRATEGY='linear' ansible-playbook role/test_import_role.yml -i ../../inventory "$@" --skip-tags never +ANSIBLE_STRATEGY='free' ansible-playbook role/test_import_role.yml -i ../../inventory "$@" --skip-tags never + + +## Include (dynamic) + +# Tasks +ANSIBLE_STRATEGY='linear' ansible-playbook tasks/test_include_tasks.yml -i ../../inventory "$@" --skip-tags never +ANSIBLE_STRATEGY='free' ansible-playbook tasks/test_include_tasks.yml -i ../../inventory "$@" --skip-tags never +ANSIBLE_STRATEGY='free' ansible-playbook tasks/test_include_tasks_tags.yml -i ../../inventory "$@" --tags tasks1,canary1,validate --skip-tags never + +# Role +ANSIBLE_STRATEGY='linear' ansible-playbook role/test_include_role.yml -i ../../inventory "$@" --skip-tags never +ANSIBLE_STRATEGY='free' ansible-playbook role/test_include_role.yml -i ../../inventory "$@" --skip-tags never + + +## Recursion +# https://github.com/ansible/ansible/issues/23609 +ANSIBLE_STRATEGY='linear' ansible-playbook test_recursion.yml -i ../../inventory "$@" --skip-tags never |