Fix integration.modules.state.StateModuleTest.test_issue_1896_file_append_source and still maintaining an empty line check.

This commit is contained in:
Pedro Algarvio 2012-11-04 11:35:23 +00:00
parent 3de32be0c9
commit 5af62d01ac
2 changed files with 4 additions and 2 deletions

View file

@ -2,3 +2,4 @@
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

View file

@ -53,6 +53,9 @@ class StateModuleTest(integration.ModuleCase):
'''
Verify that we can append a file's contents
'''
if os.path.isfile('/tmp/salttest/test.append'):
os.unlink('/tmp/salttest/test.append')
self.run_function('state.sls', mods='testappend')
self.run_function('state.sls', mods='testappend.step-1')
self.run_function('state.sls', mods='testappend.step-2')
@ -66,7 +69,6 @@ fi
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
''', open('/tmp/salttest/test.append', 'r').read())
# Re-append switching order
@ -82,7 +84,6 @@ fi
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
''', open('/tmp/salttest/test.append', 'r').read())
def test_issue_1876_syntax_error(self):