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
4bdbe4dc
Commit
4bdbe4dc
authored
Aug 10, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some test prints
parent
9991a530
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
11 deletions
+0
-11
test/TestPlayBook.py
+0
-7
test/TestRunner.py
+0
-4
No files found.
test/TestPlayBook.py
View file @
4bdbe4dc
...
...
@@ -142,16 +142,12 @@ class TestPlaybook(unittest.TestCase):
runner_callbacks
=
self
.
test_callbacks
)
result
=
self
.
playbook
.
run
()
print
EVENTS
return
result
def
test_one
(
self
):
pb
=
'test/playbook1.yml'
actual
=
self
.
_run
(
pb
)
# if different, this will output to screen
print
"**ACTUAL**"
print
utils
.
jsonify
(
actual
,
format
=
True
)
expected
=
{
"localhost"
:
{
"changed"
:
9
,
...
...
@@ -161,14 +157,11 @@ class TestPlaybook(unittest.TestCase):
"unreachable"
:
0
}
}
print
"**EXPECTED**"
print
utils
.
jsonify
(
expected
,
format
=
True
)
assert
utils
.
jsonify
(
expected
,
format
=
True
)
==
utils
.
jsonify
(
actual
,
format
=
True
)
# make sure the template module took options from the vars section
data
=
file
(
'/tmp/ansible_test_data_template.out'
)
.
read
()
print
data
assert
data
.
find
(
"ears"
)
!=
-
1
,
"template success"
# disabling until we have a nice way of using lookup plugins inside '{{' and '}}'
...
...
test/TestRunner.py
View file @
4bdbe4dc
...
...
@@ -74,7 +74,6 @@ class TestRunner(unittest.TestCase):
results
=
self
.
runner
.
run
()
# when using nosetests this will only show up on failure
# which is pretty useful
print
"RESULTS=
%
s"
%
results
assert
"localhost"
in
results
[
'contacted'
]
return
results
[
'contacted'
][
'localhost'
]
...
...
@@ -197,7 +196,6 @@ class TestRunner(unittest.TestCase):
assert
os
.
path
.
isfile
(
filedemo
)
res
=
self
.
_run
(
'file'
,
[
'dest='
+
filedemo
,
'mode=604'
,
'state=file'
])
print
res
assert
res
[
'changed'
]
assert
os
.
path
.
isfile
(
filedemo
)
and
os
.
stat
(
filedemo
)
.
st_mode
==
0100604
...
...
@@ -294,7 +292,6 @@ class TestRunner(unittest.TestCase):
"src=
%
s"
%
input
,
"dest=
%
s"
%
output
,
])
print
result
assert
os
.
path
.
exists
(
output
)
out
=
file
(
output
)
.
read
()
assert
out
.
find
(
"first"
)
!=
-
1
...
...
@@ -307,7 +304,6 @@ class TestRunner(unittest.TestCase):
"src=
%
s"
%
input
,
"dest=
%
s"
%
output
,
])
print
result
assert
result
[
'changed'
]
is
False
def
test_lineinfile
(
self
):
...
...
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