summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael DeHaan <michael.dehaan@gmail.com>2014-07-23 22:35:24 -0400
committerJames Cammarata <jimi@sngx.net>2014-07-24 21:59:42 -0500
commit12861ebc93b77f9e623fd104bf48ad100a069fa1 (patch)
tree39af8524f603c51842b086e844dfe133ee46bf57
parent5a8ce71a4a2504214916ec07a8eafe71ad844fb3 (diff)
downloadansible-12861ebc93b77f9e623fd104bf48ad100a069fa1.tar.gz
Add missing role test file.
-rw-r--r--test/integration/roles/test_bad_parsing/tasks/main.yml45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/integration/roles/test_bad_parsing/tasks/main.yml b/test/integration/roles/test_bad_parsing/tasks/main.yml
new file mode 100644
index 0000000000..e84878baa6
--- /dev/null
+++ b/test/integration/roles/test_bad_parsing/tasks/main.yml
@@ -0,0 +1,45 @@
+# test code for the ping module
+# (c) 2014, Michael DeHaan <michael@ansible.com>
+
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# the following tests all raise errors, to use them in a Makefile, we run them with different flags, as
+# otherwise ansible stops at the first one and we want to ensure STOP conditions for each
+
+- set_fact:
+ test_file: "./ansible_test_file" # FIXME, use set tempdir
+ test_input: "owner=test"
+ chdir: "mom chdir=/tmp"
+ tags: common
+
+- file: name={{test_file}} state=touch
+ tags: common
+
+- name: test that we cannot insert arguments
+ file: path={{ test_file }} {{ test_input }}
+ failed_when: False # ignore the module, just test the parser
+ tags: scenario1
+
+- name: test that we cannot duplicate arguments
+ file: path={{ test_file }} owner=test2 {{ test_input }}
+ failed_when: False # ignore the module, just test the parser
+ tags: scenario2
+
+- name: test that we can't do this for the shell module
+ shell: echo hi {{ chdir }}
+ failed_when: False
+ tags: scenario3
+