Mercurial > bitten > bitten-test
diff bitten/tests/master.py @ 758:d11ef8024d7c
Make all times be generated by the server. This eliminates a number of inconsistencies you'll see when the clocks on the slaves are skewed from the master.
author | wbell |
---|---|
date | Sat, 24 Apr 2010 14:28:41 +0000 |
parents | 545be0c8f405 |
children | b2272caf5ac4 |
line wrap: on
line diff
--- a/bitten/tests/master.py +++ b/bitten/tests/master.py @@ -913,42 +913,6 @@ self.assertEquals(400, outheaders['Status']) self.assertEquals('XML parser error', outbody.getvalue()) - def test_process_build_step_invalid_datetime(self): - recipe = """<build> - <step id="foo"> - </step> -</build>""" - BuildConfig(self.env, 'test', path='somepath', active=True, - recipe=recipe).insert() - build = Build(self.env, 'test', '123', 1, slave='hal', rev_time=42, - started=42, status=Build.IN_PROGRESS) - build.slave_info[Build.TOKEN] = '123'; - build.insert() - - inbody = StringIO("""<result step="foo" status="success" - time="sometime tomorrow maybe" - duration="3.45"> -</result>""") - outheaders = {} - outbody = StringIO() - req = Mock(method='POST', base_path='', - path_info='/builds/%d/steps/' % build.id, - href=Href('/trac'), remote_addr='127.0.0.1', args={}, - perm=PermissionCache(self.env, 'hal'), - read=inbody.read, - send_response=lambda x: outheaders.setdefault('Status', x), - send_header=lambda x, y: outheaders.setdefault(x, y), - write=outbody.write, - incookie=Cookie('trac_auth=123')) - - module = BuildMaster(self.env) - assert module.match_request(req) - - self.assertRaises(RequestDone, module.process_request, req) - - self.assertEquals(400, outheaders['Status']) - self.assertEquals("Invalid ISO date/time 'sometime tomorrow maybe'", - outbody.getvalue()) def test_process_build_step_no_post(self): BuildConfig(self.env, 'test', path='somepath', active=True,