def test_status_failed(self): exec_id = get_execution_id() self.assertIsNotNone(exec_id) cause = 'Fake cause' put_status_failed(exec_id, cause) status = get_status(exec_id) self.assertEquals(status['status'], "FAILED") self.assertEquals(status['cause'], cause)
def test_status_succeeded(self): fake_bucket_name = 'fake_bucket_name' fake_location = 'fake/location' exec_id = get_execution_id() self.assertIsNotNone(exec_id) for replica in Replica: put_status_succeeded(exec_id, replica, fake_bucket_name, fake_location) status = get_status(exec_id) self.assertEquals(status['status'], "SUCCEEDED") self.assertEquals(status['location'], f"{replica.storage_schema}://{fake_bucket_name}/{fake_location}")
def test_status_started(self): exec_id = get_execution_id() self.assertIsNotNone(exec_id) put_status_started(exec_id) status = get_status(exec_id) self.assertEquals(status['status'], "RUNNING")
def get(checkout_job_id: str): response = get_status(checkout_job_id) return response, requests.codes.ok