diff options
author | nitzmahone <mdavis@ansible.com> | 2016-03-18 10:13:45 -0700 |
---|---|---|
committer | nitzmahone <mdavis@ansible.com> | 2016-03-18 10:14:22 -0700 |
commit | b95286c88e3e8636ecd697cc41b55dcf7fbeb026 (patch) | |
tree | a807991df066c236dd94375704a3ac39f48345e2 | |
parent | 60c943997bced134ffa7c4440a4021e77cd29540 (diff) | |
download | ansible-b95286c88e3e8636ecd697cc41b55dcf7fbeb026.tar.gz |
re-integrate test_test_infra output checking
added secondary run with overridden inventory/test args per bcoca request
-rw-r--r-- | test/integration/Makefile | 6 | ||||
-rw-r--r-- | test/integration/inventory.local | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test/integration/Makefile b/test/integration/Makefile index b02592eaf2..48382cd4c4 100644 --- a/test/integration/Makefile +++ b/test/integration/Makefile @@ -26,8 +26,10 @@ EUID := $(shell id -u -r) 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 test_gathering_facts test_test_infra: - # ensure fail/assert work and can stop execution with non-zero exit code - PB_OUT=$$(ansible-playbook -i $(INVENTORY) test_test_infra.yml -e @$(VARS_FILE) $(CREDENTIALS_ARG) $(TEST_FLAGS)) ; APB_RC=$$? ; echo "$$PB_OUT" ; echo "rc was $$APB_RC (must be non-zero)" ; [ $$APB_RC -ne 0 ] + # ensure fail/assert work locally and can stop execution with non-zero exit code + PB_OUT=$$(ansible-playbook -i inventory.local test_test_infra.yml) ; APB_RC=$$? ; echo "$$PB_OUT" ; echo "rc was $$APB_RC (must be non-zero)" ; [ $$APB_RC -ne 0 ] ; echo "ensure playbook output shows assert/fail works (True)" ; echo "$$PB_OUT" | grep "fail works (True)" || exit 1 ; echo "$$PB_OUT" | fgrep "assert works (True)" || exit 1 + # ensure we work using all specified test args, overridden inventory, etc + PB_OUT=$$(ansible-playbook -i $(INVENTORY) test_test_infra.yml -e @$(VARS_FILE) $(CREDENTIALS_ARG) $(TEST_FLAGS)) ; APB_RC=$$? ; echo "$$PB_OUT" ; echo "rc was $$APB_RC (must be non-zero)" ; [ $$APB_RC -ne 0 ] ; echo "ensure playbook output shows assert/fail works (True)" ; echo "$$PB_OUT" | grep "fail works (True)" || exit 1 ; echo "$$PB_OUT" | fgrep "assert works (True)" || exit 1 setup: rm -rf $(TEST_DIR) diff --git a/test/integration/inventory.local b/test/integration/inventory.local new file mode 100644 index 0000000000..2baa1f88fb --- /dev/null +++ b/test/integration/inventory.local @@ -0,0 +1,2 @@ +testhost ansible_connection=local + |