mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Revert "Fix broken test on 2014.7" since it runs properly on develop
This reverts commit 9c682933d4
.
This commit is contained in:
parent
3db44821e4
commit
de520f4766
1 changed files with 22 additions and 2 deletions
|
@ -331,7 +331,7 @@ class CallTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
|
||||
self.run_script(
|
||||
'salt-call',
|
||||
'-c {0} --output-file={1} -g'.format(
|
||||
'-c {0} --output-file={1} --output-file-append -g'.format(
|
||||
self.get_config_dir(),
|
||||
output_file
|
||||
),
|
||||
|
@ -340,7 +340,27 @@ class CallTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
)
|
||||
stat2 = os.stat(output_file)
|
||||
self.assertEqual(stat1.st_mode, stat2.st_mode)
|
||||
# self.assertEqual(stat1.st_ctime, stat2.st_ctime)
|
||||
# Data was appeneded to file
|
||||
self.assertTrue(stat1.st_size < stat2.st_size)
|
||||
|
||||
# Let's remove the output file
|
||||
os.unlink(output_file)
|
||||
|
||||
# Not appending data
|
||||
self.run_script(
|
||||
'salt-call',
|
||||
'-c {0} --output-file={1} -g'.format(
|
||||
self.get_config_dir(),
|
||||
output_file
|
||||
),
|
||||
catch_stderr=True,
|
||||
with_retcode=True
|
||||
)
|
||||
stat3 = os.stat(output_file)
|
||||
# Mode must have changed since we're creating a new log file
|
||||
self.assertNotEqual(stat1.st_mode, stat3.st_mode)
|
||||
# Data was appended to file
|
||||
self.assertEqual(stat1.st_size, stat3.st_size)
|
||||
finally:
|
||||
if os.path.exists(output_file):
|
||||
os.unlink(output_file)
|
||||
|
|
Loading…
Add table
Reference in a new issue