diff --git a/test/integration/Makefile b/test/integration/Makefile index d55f1fa830..0f6e1ddb38 100644 --- a/test/integration/Makefile +++ b/test/integration/Makefile @@ -23,9 +23,12 @@ VAULT_PASSWORD_FILE = vault-password CONSUL_RUNNING := $(shell python consul_running.py) EUID := $(shell id -u -r) -all: setup parsing test_var_precedence unicode test_templating_settings environment non_destructive destructive includes blocks pull check_mode test_hash test_handlers test_group_by test_vault test_tags test_lookup_paths no_log test_connection +all: setup test_test_infra parsing test_var_precedence unicode test_templating_settings environment non_destructive destructive includes blocks pull check_mode test_hash test_handlers test_group_by test_vault test_tags test_lookup_paths no_log test_connection -setup: +test_test_infra: + [ "$$(ansible-playbook -i $(INVENTORY) test_test_infra.yml -e @$(VARS_FILE) $(CREDENTIALS_ARG) $(TEST_FLAGS) | fgrep works | xargs)" = "msg: fail works (True) msg: assert works (True)" ] + +setup: test_test_infra rm -rf $(TEST_DIR) mkdir -p $(TEST_DIR) diff --git a/test/integration/test_test_infra.yml b/test/integration/test_test_infra.yml new file mode 100644 index 0000000000..b05d0e2e3e --- /dev/null +++ b/test/integration/test_test_infra.yml @@ -0,0 +1,21 @@ +- hosts: testhost + gather_facts: no + tasks: + - fail: + ignore_errors: yes + register: fail_out + + - debug: + msg: fail works ({{ fail_out.failed }}) + + - assert: + that: false + ignore_errors: yes + register: assert_out + + - debug: + msg: assert works ({{ assert_out.failed }}) + + - fail: + msg: fail actually failed +