Commit 73bdb764 authored by Antoine Catton's avatar Antoine Catton

Merge branch 'promises' of https://git.erp5.org/repos/slapos.core into promises

parents 5021ae95 7808bc19
......@@ -442,6 +442,7 @@ chmod 755 etc/run/wrapper
self.assertTrue('Working' in open(wrapper_log, 'r').read())
class TestSlapgridCPWithMasterPromise(MasterMixin, unittest.TestCase):
def test_one_failing_promise(self):
def server_response(self_httplib, path, method, body, header):
......@@ -574,10 +575,9 @@ exit 0""" % {'worked_file': worked_file})
self.error = True
self.assertEqual(parsed_qs['computer_partition_id'][0], '0')
# XXX: Hardcoded dropPrivileges line ignore
error_log = '\n'.join([line for line in parsed_qs['error_log'][0].splitlines()
self.error_log = '\n'.join([line for line in parsed_qs['error_log'][0].splitlines()
if 'dropPrivileges' not in line])
# end XXX
self.assertEqual(error_log, 'Error')
return (200, {}, '')
else:
return (404, {}, '')
......@@ -602,6 +602,7 @@ exit 127""" % {'worked_file': worked_file})
self.assertTrue(self.grid.processComputerPartitionList())
self.assertTrue(os.path.isfile(worked_file))
self.assertEqual(self.error_log, 'Error')
self.assertTrue(self.error)
def test_timeout_works(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment