Reorganize integration tests:
- Move legacy tests into a separate directory. - Reduce common dependencies between targets.
This commit is contained in:
parent
896c4b42ba
commit
781fd7099a
513 changed files with 111 additions and 6 deletions
|
@ -1 +0,0 @@
|
|||
../targets/setup_ec2
|
|
@ -1 +0,0 @@
|
|||
../targets/setup_sshkey
|
|
@ -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"
|
||||
|
|
1
test/integration/targets/filters/host_vars/testhost
Normal file
1
test/integration/targets/filters/host_vars/testhost
Normal file
|
@ -0,0 +1 @@
|
|||
a: 1
|
1
test/integration/targets/filters/inventory
Symbolic link
1
test/integration/targets/filters/inventory
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../inventory
|
|
@ -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 "$@"
|
||||
|
|
3
test/integration/targets/hash/group_vars/all
Normal file
3
test/integration/targets/hash/group_vars/all
Normal file
|
@ -0,0 +1,3 @@
|
|||
# variables used for hash merging behavior testing
|
||||
test_hash:
|
||||
group_vars_all: "this is in group_vars/all"
|
2
test/integration/targets/hash/host_vars/testhost
Normal file
2
test/integration/targets/hash/host_vars/testhost
Normal file
|
@ -0,0 +1,2 @@
|
|||
test_hash:
|
||||
host_vars_testhost: "this is in host_vars/testhost"
|
1
test/integration/targets/hash/inventory
Symbolic link
1
test/integration/targets/hash/inventory
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../inventory
|
|
@ -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}"
|
||||
|
|
9
test/integration/targets/var_blending/group_vars/all
Normal file
9
test/integration/targets/var_blending/group_vars/all
Normal 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'
|
1
test/integration/targets/var_blending/group_vars/local
Normal file
1
test/integration/targets/var_blending/group_vars/local
Normal file
|
@ -0,0 +1 @@
|
|||
tres: 'three'
|
4
test/integration/targets/var_blending/host_vars/testhost
Normal file
4
test/integration/targets/var_blending/host_vars/testhost
Normal file
|
@ -0,0 +1,4 @@
|
|||
a: 1
|
||||
b: 2
|
||||
c: 3
|
||||
d: 4
|
1
test/integration/targets/var_blending/inventory
Symbolic link
1
test/integration/targets/var_blending/inventory
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../inventory
|
|
@ -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 "$@"
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# Var precedence testing
|
||||
defaults_file_var_role3: "overridden from inventory"
|
3
test/legacy/group_vars/amazon
Normal file
3
test/legacy/group_vars/amazon
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
ec2_url: ec2.amazonaws.com
|
||||
ec2_region: us-east-1
|
5
test/legacy/integration_config.yml
Normal file
5
test/legacy/integration_config.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
win_output_dir: 'C:\ansible_testing'
|
||||
output_dir: ~/ansible_testing
|
||||
non_root_test_user: ansible
|
||||
pip_test_package: isort
|
55
test/legacy/inventory
Normal file
55
test/legacy/inventory
Normal file
|
@ -0,0 +1,55 @@
|
|||
[local]
|
||||
testhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
testhost2 ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
# For testing delegate_to
|
||||
testhost3 ansible_ssh_host=127.0.0.3
|
||||
testhost4 ansible_ssh_host=127.0.0.4
|
||||
# For testing fact gathering
|
||||
facthost[0:20] ansible_host=127.0.0.1 ansible_connection=local
|
||||
|
||||
[binary_modules]
|
||||
testhost_binary_modules ansible_host=127.0.0.1 ansible_connection=local
|
||||
|
||||
[local_group]
|
||||
kube-pippin.knf.local
|
||||
|
||||
# the following inline declarations are accompanied
|
||||
# by (preferred) group_vars/ and host_vars/ variables
|
||||
# and are used in testing of variable precedence
|
||||
|
||||
[inven_overridehosts]
|
||||
invenoverride ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
|
||||
[all:vars]
|
||||
extra_var_override=FROM_INVENTORY
|
||||
inven_var=inventory_var
|
||||
unicode_host_var=CaféEñyei
|
||||
|
||||
[inven_overridehosts:vars]
|
||||
foo=foo
|
||||
var_dir=vars
|
||||
|
||||
[arbitrary_parent:children]
|
||||
local
|
||||
|
||||
[local:vars]
|
||||
parent_var=6000
|
||||
groups_tree_var=5000
|
||||
|
||||
[arbitrary_parent:vars]
|
||||
groups_tree_var=4000
|
||||
overridden_in_parent=1000
|
||||
|
||||
[arbitrary_grandparent:children]
|
||||
arbitrary_parent
|
||||
|
||||
[arbitrary_grandparent:vars]
|
||||
groups_tree_var=3000
|
||||
grandparent_var=2000
|
||||
overridden_in_parent=2000
|
||||
|
||||
[amazon]
|
||||
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
|
||||
[azure]
|
||||
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue