Fixed integration test

This commit is contained in:
Ryan Schneider 2012-11-06 19:05:59 -08:00
parent 49fb321254
commit 721bce0a11
3 changed files with 9 additions and 6 deletions

View File

@ -86,12 +86,12 @@ def get_file(path, dest, env='base', template=None):
try:
path = _render(path)
except CommandExecutionError as exc:
log.error(exc.message)
log.error(str(exc))
return ''
try:
dest = _render(dest)
except CommandExecutionError as exc:
log.error(exc.message)
log.error(str(exc))
return ''
if not hash_file(path, env):

View File

@ -0,0 +1 @@
I could just fancy some cheese, Gromit. What do you say? Cheddar?

View File

@ -24,7 +24,7 @@ class CPModuleTest(integration.ModuleCase):
self.assertIn('KNIGHT: They\'re nervous, sire.', data)
self.assertNotIn('bacon', data)
def text_get_file_templated_paths(self):
def test_get_file_templated_paths(self):
'''
cp.get_file
'''
@ -32,9 +32,11 @@ class CPModuleTest(integration.ModuleCase):
self.run_function(
'cp.get_file',
[
'salt://{{grain.test_grain}}',
tgt.replace('cheese', '{{grain.test_grain}}'),
])
'salt://{{grains.test_grain}}',
tgt.replace('cheese', '{{grains.test_grain}}')
],
template='jinja'
)
with open(tgt, 'r') as cheese:
data = cheese.read()
self.assertIn('Gromit', data)