Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
d913f169
Commit
d913f169
authored
Jun 05, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update failed_when integration test to be more thorough
parent
423f1233
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
8 deletions
+48
-8
test/integration/roles/test_failed_when/tasks/main.yml
+48
-8
No files found.
test/integration/roles/test_failed_when/tasks/main.yml
View file @
d913f169
...
@@ -16,13 +16,54 @@
...
@@ -16,13 +16,54 @@
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-
name
:
Test failed_when behavior but catch it.
-
name
:
command rc 0 failed_when_result undef
command
:
/bin/true
shell
:
exit 0
failed_when
:
2 != 3
register
:
failed
ignore_errors
:
True
ignore_errors
:
True
register
:
result
-
name
:
Assert that failed_when is
true
.
-
assert
:
assert
:
that
:
that
:
-
"
failed.failed_when_result
==
True"
-
"
'failed'
not
in
result"
\ No newline at end of file
-
name
:
command rc 0 failed_when_result False
shell
:
exit 0
failed_when
:
false
ignore_errors
:
true
register
:
result
-
assert
:
that
:
-
"
'failed'
in
result
and
not
result.failed"
-
"
'failed_when_result'
in
result
and
not
result.failed_when_result"
-
name
:
command rc 1 failed_when_result True
shell
:
exit 1
failed_when
:
true
ignore_errors
:
true
register
:
result
-
assert
:
that
:
-
"
'failed'
in
result
and
result.failed"
-
"
'failed_when_result'
in
result
and
result.failed_when_result"
-
name
:
command rc 1 failed_when_result undef
shell
:
exit 1
ignore_errors
:
true
register
:
result
-
assert
:
that
:
-
"
'failed'
not
in
result"
-
name
:
command rc 1 failed_when_result False
shell
:
exit 1
failed_when
:
false
ignore_errors
:
true
register
:
result
-
assert
:
that
:
-
"
'failed'
in
result
and
not
result.failed"
-
"
'failed_when_result'
in
result
and
not
result.failed_when_result"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment