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

This commit is contained in:
Pedro Algarvio 2014-01-19 07:47:15 +00:00
parent 05b2636cd5
commit c6de2adb31

View file

@ -241,11 +241,19 @@ class MatchTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
'--config-dir {0} minion test.ping'.format(
config_dir
),
timeout=15
timeout=15,
catch_stderr=True,
with_retcode=True
)
try:
self.assertIn('minion', '\n'.join(ret))
self.assertIn('minion', '\n'.join(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):