Split out var_blending test into targets dir. (#17996)

pull/17089/merge
Matt Clay 8 years ago committed by GitHub
parent 410b96d716
commit 374e4348e4

@ -27,7 +27,7 @@ UNAME := $(shell uname | tr '[:upper:]' '[:lower:]')
all: other non_destructive destructive
other: test_test_infra parsing test_var_precedence unicode test_templating_settings environment test_as includes blocks pull_run pull_no_127 pull_limit_inventory check_mode test_hash test_handlers test_group_by test_vault test_tags test_lookup_paths no_log test_gathering_facts test_binary_modules_posix test_hosts_field test_lookup_properties args
other: test_test_infra parsing test_var_blending test_var_precedence unicode test_templating_settings environment test_as includes blocks pull_run pull_no_127 pull_limit_inventory check_mode test_hash test_handlers test_group_by test_vault test_tags test_lookup_paths no_log test_gathering_facts test_binary_modules_posix test_hosts_field test_lookup_properties args
test_test_infra:
(cd targets/test_infra && ./runme.sh $(TEST_FLAGS))
@ -149,6 +149,9 @@ test_handlers:
test_hash:
(cd targets/hash && ./runme.sh $(TEST_FLAGS))
test_var_blending:
(cd targets/var_blending && ./runme.sh $(TEST_FLAGS))
test_var_precedence:
(cd targets/var_precedence && ./runme.sh $(TEST_FLAGS))

@ -4,7 +4,3 @@ output_dir: ~/ansible_testing
non_root_test_user: ansible
pip_test_package: epdb
# variables used in precedence tests, here passed to -e
etest: 'from -e'

@ -1,17 +1,7 @@
- hosts: testhost
# these variables are defined here for variable blending tests only.
# in general, define test variables in the role/rolenamevars/main.yml
vars_files:
- vars_file.yml
vars:
vars_var: 123
gather_facts: True
roles:
- { role: test_ping, tags: test_ping }
- { role: test_var_blending, parameterized_beats_default: 1234, tags: test_var_blending }
- { role: test_special_vars, tags: test_special_vars }
- { role: test_ignore_errors, tags: test_ignore_errors }
- { role: test_conditionals, tags: test_conditionals }

@ -11,3 +11,7 @@ cond_list_of_items:
- b
- c
things1:
- 1
- 2
vars_file_var: 321

@ -1,3 +1,9 @@
mydict:
mykey1: myval1
mykey2: myval2
things1:
- 1
- 2
things2:
- "{{ foo }}"
- "{{ foob | default('') }}"

@ -46,3 +46,9 @@
that:
- var_undefined.undefined_variable == 'VARIABLE IS NOT DEFINED!'
- same_value_as_var_name.same_value_as_var_name_var == 'same_value_as_var_name_var'
- name: cleanup temporary template output
file: path={{output_dir}}/foo.templated state=absent
- name: cleanup temporary copy
file: path={{output_dir}}/foo.txt state=absent

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -eux
ansible-playbook test_var_blending.yml -i ../../inventory -e @integration_config.yml -v "$@"

@ -0,0 +1,8 @@
- hosts: testhost
vars_files:
- vars_file.yml
vars:
vars_var: 123
gather_facts: True
roles:
- { role: test_var_blending, parameterized_beats_default: 1234, tags: test_var_blending }
Loading…
Cancel
Save