From ed059ffca922a02f419e042d56a03035e475eef1 Mon Sep 17 00:00:00 2001 From: Robin Roth Date: Tue, 2 Feb 2016 12:13:23 +0100 Subject: [PATCH] add integration test for ansible-pull * this test includes the behavior described in #13688 and #13681 * it runs a minimal playbook and checks for correct use of inventory and limit --- test/integration/Makefile | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/test/integration/Makefile b/test/integration/Makefile index 95b9d4320c4..8f2e880305b 100644 --- a/test/integration/Makefile +++ b/test/integration/Makefile @@ -21,7 +21,7 @@ VAULT_PASSWORD_FILE = vault-password CONSUL_RUNNING := $(shell python consul_running.py) -all: parsing test_var_precedence unicode test_templating_settings environment non_destructive destructive includes check_mode test_hash test_handlers test_group_by test_vault test_tags test_lookup_paths no_log +all: parsing test_var_precedence unicode test_templating_settings environment non_destructive destructive includes pull check_mode test_hash test_handlers test_group_by test_vault test_tags test_lookup_paths no_log parsing: ansible-playbook bad_parsing.yml -i $(INVENTORY) -e @$(VARS_FILE) $(CREDENTIALS_ARG) -vvv $(TEST_FLAGS) --tags prepare,common,scenario5 @@ -30,6 +30,29 @@ parsing: includes: ansible-playbook test_includes.yml -i $(INVENTORY) -e @$(VARS_FILE) $(CREDENTIALS_ARG) $(TEST_FLAGS) +pull: pull_run pull_no_127 pull_limit_inventory + +pull_run: + ansible-pull -d $(MYTMPDIR) -U https://github.com/ansible-test-robinro/pull-integration-test.git | grep MAGICKEYWORD; \ + RC=$$? ; \ + rm -rf $(MYTMPDIR); \ + exit $$RC + +# test for https://github.com/ansible/ansible/issues/13681 +pull_no_127: + ansible-pull -d $(MYTMPDIR) -U https://github.com/ansible-test-robinro/pull-integration-test.git | grep -v 127\.0\.0\.1; \ + RC=$$? ; \ + rm -rf $(MYTMPDIR); \ + exit $$RC + +# test for https://github.com/ansible/ansible/issues/13688 +pull_limit_inventory: + ansible-pull -d $(MYTMPDIR) -U https://github.com/ansible-test-robinro/pull-integration-test.git; \ + RC=$$? ; \ + rm -rf $(MYTMPDIR); \ + exit $$RC + + unicode: ansible-playbook unicode.yml -i $(INVENTORY) -e @$(VARS_FILE) -v $(TEST_FLAGS) -e 'extra_var=café' # Test the start-at-task flag #9571