Reorganize integration tests:

- Move legacy tests into a separate directory.
- Reduce common dependencies between targets.
This commit is contained in:
Matt Clay 2017-09-13 17:31:44 -07:00
commit 781fd7099a
513 changed files with 111 additions and 6 deletions

View file

@ -0,0 +1,3 @@
dependencies:
- prepare_tests
- setup_ec2

View file

@ -15,3 +15,8 @@ things1:
- 1
- 2
vars_file_var: 321
test_bare: true
test_bare_var: 123
test_bare_nested_good: "test_bare_var == 123"
test_bare_nested_bad: "{{test_bare_var}} == 321"

View file

@ -0,0 +1 @@
a: 1

View file

@ -0,0 +1 @@
../../inventory

View file

@ -6,4 +6,4 @@ set -eux
# because plugins and requirements are loaded before the task runs
pip install jmespath
ANSIBLE_ROLES_PATH=../ ansible-playbook filters.yml -i ../../inventory -e @../../integration_config.yml "$@"
ANSIBLE_ROLES_PATH=../ ansible-playbook filters.yml -i inventory -e @../../integration_config.yml "$@"

View file

@ -0,0 +1,3 @@
# variables used for hash merging behavior testing
test_hash:
group_vars_all: "this is in group_vars/all"

View file

@ -0,0 +1,2 @@
test_hash:
host_vars_testhost: "this is in host_vars/testhost"

View file

@ -0,0 +1 @@
../../inventory

View file

@ -4,5 +4,5 @@ set -eux
JSON_ARG='{"test_hash":{"extra_args":"this is an extra arg"}}'
ANSIBLE_HASH_BEHAVIOUR=replace ansible-playbook test_hash.yml -i ../../inventory -v "$@" -e "${JSON_ARG}"
ANSIBLE_HASH_BEHAVIOUR=merge ansible-playbook test_hash.yml -i ../../inventory -v "$@" -e "${JSON_ARG}"
ANSIBLE_HASH_BEHAVIOUR=replace ansible-playbook test_hash.yml -i inventory -v "$@" -e "${JSON_ARG}"
ANSIBLE_HASH_BEHAVIOUR=merge ansible-playbook test_hash.yml -i inventory -v "$@" -e "${JSON_ARG}"

View file

@ -0,0 +1,3 @@
dependencies:
- prepare_tests
- setup_ec2

View file

@ -0,0 +1,3 @@
---
ec2_url: ec2.amazonaws.com
ec2_region: us-east-1

View file

@ -0,0 +1,9 @@
a: 999
b: 998
c: 997
d: 996
uno: 1
dos: 2
tres: 3
etest: 'from group_vars'
inventory_beats_default: 'narf'

View file

@ -0,0 +1 @@
tres: 'three'

View file

@ -0,0 +1,4 @@
a: 1
b: 2
c: 3
d: 4

View file

@ -0,0 +1 @@
../../inventory

View file

@ -2,4 +2,4 @@
set -eux
ansible-playbook test_var_blending.yml -i ../../inventory -e @integration_config.yml -v "$@"
ansible-playbook test_var_blending.yml -i inventory -e @integration_config.yml -v "$@"

View file

@ -0,0 +1,2 @@
# Var precedence testing
defaults_file_var_role3: "overridden from inventory"