1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Remove some test prints

This commit is contained in:
Michael DeHaan 2013-08-10 17:35:43 -04:00
parent 9991a530ab
commit 4bdbe4dc4f
2 changed files with 0 additions and 11 deletions

View file

@ -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 '}}'

View file

@ -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):