Пример #1
0
 def delete_many_builds(self, request):
     """Deletes scheduled or started builds in a bucket."""
     service.delete_many_builds(request.bucket,
                                request.status,
                                tags=request.tag[:],
                                created_by=request.created_by)
     return self.DeleteManyBuildsResponse()
Пример #2
0
 def test_delete_many_completed_builds(self):
     with self.assertRaises(errors.InvalidInputError):
         service.delete_many_builds('chromium/try',
                                    model.BuildStatus.COMPLETED)
Пример #3
0
 def test_delete_many_builds_schedule_task(self):
     service.delete_many_builds('chromium/try', model.BuildStatus.SCHEDULED)
Пример #4
0
 def test_delete_many_builds_auth_error(self):
     self.mock_cannot(user.Action.DELETE_SCHEDULED_BUILDS)
     with self.assertRaises(auth.AuthorizationError):
         service.delete_many_builds('chromium/try',
                                    model.BuildStatus.SCHEDULED)
Пример #5
0
 def delete_many_builds(self, request):
   """Deletes scheduled or started builds in a bucket."""
   service.delete_many_builds(
     request.bucket, request.status,
     tags=request.tag[:], created_by=request.created_by)
   return self.DeleteManyBuildsResponse()
Пример #6
0
 def test_delete_many_completed_builds(self):
   with self.assertRaises(errors.InvalidInputError):
     service.delete_many_builds(
       self.test_build.bucket, model.BuildStatus.COMPLETED)
Пример #7
0
 def test_delete_many_builds_schedule_task(self):
   service.delete_many_builds(
     self.test_build.bucket, model.BuildStatus.SCHEDULED)
Пример #8
0
 def test_delete_many_builds_auth_error(self):
   self.mock_cannot(acl.Action.DELETE_SCHEDULED_BUILDS)
   with self.assertRaises(auth.AuthorizationError):
     service.delete_many_builds(
       self.test_build.bucket, model.BuildStatus.SCHEDULED)