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

This commit is contained in:
Pedro Algarvio 2014-01-19 06:44:45 +00:00
parent 5a8c6fc770
commit a5f2286960

View file

@ -220,11 +220,19 @@ class CallTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
'--config-dir {0} cmd.run "echo foo"'.format(
config_dir
),
timeout=15
timeout=15,
catch_stderr=True,
with_retcode=True
)
try:
self.assertIn('local:', ret)
self.assertIn('local:', ret[0])
self.assertFalse(os.path.isdir(os.path.join(config_dir, 'file:')))
except AssertionError:
# 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):