def test_10_create_run(self): global rundb, run_id, run_id_stc rundb = RunDb() # STC run_id_stc = rundb.new_run('master', 'master', 100000, '10+0.01', 'book', 10, 1, '', '', username='******', tests_repo='travis', start_time=datetime.datetime.utcnow()) run = rundb.get_run(run_id_stc) run['finished'] = True rundb.buffer(run, True) # LTC run_id = rundb.new_run('master', 'master', 100000, '150+0.01', 'book', 10, 1, '', '', username='******', tests_repo='travis', start_time=datetime.datetime.utcnow()) print(' ') print(run_id) run = rundb.get_run(run_id) print(run['tasks'][0]) self.assertFalse(run['tasks'][0][u'active']) run['tasks'][0][u'active'] = True run['tasks'][0][u'worker_info'] = { 'username': '******', 'unique_key': 'travis', 'concurrency': 1} run['cores'] = 1 print(util.find_run()['args'])
def setUp(self): global rundb rundb = RunDb() run_id = rundb.new_run('master', 'master', 100000, '100+0.01', 'book', 10, 1, '', '', username='******', tests_repo='travis', start_time=datetime.datetime.utcnow()) json_params = { 'username': '******', 'password': '******', 'run_id': run_id, 'message': 'travis' } self.request = testing.DummyRequest(json_body=json_params, method='POST', rundb=rundb, userdb=rundb.userdb, actiondb=rundb.actiondb) config = testing.setUp(request=self.request)
def test_10_create_run(self): global rundb, run_id, run_id_stc rundb= RunDb() # STC run_id_stc = rundb.new_run('master', 'master', 100000, '10+0.01', 'book', 10, 1, '', '', username='******', tests_repo='travis', start_time=datetime.datetime.utcnow()) run = rundb.get_run(run_id_stc) run['finished'] = True rundb.buffer(run, True) # LTC run_id = rundb.new_run('master', 'master', 100000, '150+0.01', 'book', 10, 1, '', '', username='******', tests_repo='travis', start_time=datetime.datetime.utcnow()) print(' '); print(run_id) run = rundb.get_run(run_id) print(run['tasks'][0]) self.assertFalse(run['tasks'][0][u'active']) run['tasks'][0][u'active'] = True run['tasks'][0][u'worker_info'] = {'username': '******', 'unique_key': 'travis'} print(util.find_run()['args'])
def setUp(self): global rundb rundb= RunDb() run_id = rundb.new_run('master', 'master', 100000, '100+0.01', 'book', 10, 1, '', '', username='******', tests_repo='travis', start_time=datetime.datetime.utcnow()) json_params= {'username': '******', 'password': '******', 'run_id': run_id, 'message': 'travis'} self.request = testing.DummyRequest( json_body=json_params, method='POST', rundb=rundb, userdb=rundb.userdb, actiondb=rundb.actiondb ) config = testing.setUp(request=self.request)