Fix unit test expected results since we now exit with an error code.

This commit is contained in:
Pedro Algarvio 2014-01-19 07:50:48 +00:00
parent c6de2adb31
commit 26a8572b7e

View file

@ -49,14 +49,15 @@ class MasterTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
yaml.dump(config, default_flow_style=False)
)
self.run_script(
ret = self.run_script(
self._call_binary_,
'--config-dir {0} --pid-file {1} -l debug'.format(
config_dir,
pid_path
),
timeout=5,
catch_stderr=True
catch_stderr=True,
with_retcode=True
)
# Now kill it if still running
@ -67,6 +68,11 @@ class MasterTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
pass
try:
self.assertFalse(os.path.isdir(os.path.join(config_dir, 'file:')))
# We now fail when we're unable to properly set the syslog logger
self.assertIn(
'Failed to setup the Syslog logging handler', '\n'.join(ret[1])
)
self.assertEqual(ret[2], 2)
finally:
os.chdir(old_cwd)
if os.path.isdir(config_dir):