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
7ea95dbc
Commit
7ea95dbc
authored
Dec 03, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5137 from willthames/test_runner_fix
Ensure test_command tests are actually correct
parents
0fe7f8bc
40a44ce6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
test/TestRunner.py
+5
-5
No files found.
test/TestRunner.py
View file @
7ea95dbc
...
...
@@ -146,26 +146,26 @@ class TestRunner(unittest.TestCase):
result
=
self
.
_run
(
'command'
,
[
"/usr/bin/this_does_not_exist"
,
"splat"
])
assert
'msg'
in
result
assert
'failed'
in
result
assert
result
.
get
(
'failed'
)
result
=
self
.
_run
(
'shell'
,
[
"/bin/echo"
,
"$HOME"
])
assert
'failed'
not
in
result
assert
result
[
'rc'
]
==
0
result
=
self
.
_run
(
'command'
,
[
"creates='/tmp/ansible command test'"
,
"chdir=/tmp"
,
"touch"
,
"'ansible command test'"
])
assert
'changed'
in
result
assert
result
.
get
(
'changed'
)
assert
result
[
'rc'
]
==
0
result
=
self
.
_run
(
'command'
,
[
"creates='/tmp/ansible command test'"
,
"false"
])
assert
'skipped'
in
result
assert
result
.
get
(
'skipped'
)
result
=
self
.
_run
(
'shell'
,
[
"removes=/tmp/ansible
\\
command
\\
test"
,
"chdir=/tmp"
,
"rm -f 'ansible command test'; echo $?"
])
assert
'changed'
in
result
assert
result
.
get
(
'changed'
)
assert
result
[
'rc'
]
==
0
assert
result
[
'stdout'
]
==
'0'
result
=
self
.
_run
(
'shell'
,
[
"removes=/tmp/ansible
\\
command
\\
test"
,
"false"
])
assert
'skipped'
in
result
assert
result
.
get
(
'skipped'
)
def
test_git
(
self
):
self
.
_run
(
'file'
,
[
'path=/tmp/gitdemo'
,
'state=absent'
])
...
...
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