def test_gecko_decision_task_invalid_repo(): ''' When the Gecko decision task calls SETA it will return all jobs that are less likely to catch a regression (low value jobs). ''' with pytest.raises(SetaError) as exception_info: seta_job_scheduling(project='mozilla-repo-x', build_system_type='taskcluster') assert exception_info.value.message == "The specified project repo 'mozilla-repo-x' " \ "is not supported by SETA."
def test_gecko_decision_task_invalid_repo(): ''' When the Gecko decision task calls SETA it will return all jobs that are less likely to catch a regression (low value jobs). ''' with pytest.raises(SetaError) as exception_info: seta_job_scheduling(project='mozilla-repo-x', build_system_type='taskcluster') assert str(exception_info.value) == "The specified project repo 'mozilla-repo-x' " \ "is not supported by SETA."
def test_gecko_decision_task(runnable_jobs_list, validate_request, test_repository, runnable_jobs_data, all_job_priorities_stored): ''' When the Gecko decision task calls SETA it will return all jobs that are less likely to catch a regression (low value jobs). ''' runnable_jobs_list.return_value = runnable_jobs_data jobs = seta_job_scheduling(project=test_repository.name, build_system_type='taskcluster') assert len(jobs['jobtypes'][str(datetime.date.today())]) == 1
def test_gecko_decision_task(runnable_jobs_list, validate_request, test_repository, runnable_jobs_data, all_job_priorities_stored): ''' When the Gecko decision task calls SETA it will return all jobs that are less likely to catch a regression (low value jobs). ''' runnable_jobs_list.return_value = runnable_jobs_data jobs = seta_job_scheduling(project=test_repository.name, build_system_type='taskcluster') assert len(jobs['jobtypes'][str(datetime.date.today())]) == 1
def list(self, request, project): ''' Routing to /api/project/{project}/seta/job-priorities/ This API can potentially have these consumers: * Buildbot * build_system_type=buildbot * priority=5 * format=json * TaskCluster (Gecko decision task) * build_system_type=taskcluster * format=json ''' build_system_type = request.query_params.get('build_system_type', '*') priority = request.query_params.get('priority') try: return Response(seta_job_scheduling(project, build_system_type, priority)) except SetaError as e: return Response(str(e), status=status.HTTP_400_BAD_REQUEST)
def list(self, request, project): ''' Routing to /api/project/{project}/seta/job-priorities/ This API can potentially have these consumers: * Buildbot * build_system_type=buildbot * priority=5 * format=json * TaskCluster (Gecko decision task) * build_system_type=taskcluster * format=json ''' build_system_type = request.query_params.get('build_system_type', '*') priority = request.query_params.get('priority') try: return Response(seta_job_scheduling(project, build_system_type, priority)) except SetaError as e: return Response(str(e), status=status.HTTP_400_BAD_REQUEST)