fix for build and test

This commit is contained in:
KOUNOIKE Yuusuke
2018-01-27 17:52:06 +09:00
parent 1f79ed95c2
commit 95cd6b6e90
7 changed files with 11 additions and 6 deletions

View File

@@ -20,6 +20,9 @@ class IndexController extends IndexControllerBase
with AccountService
with RepositorySearchService
with IssuesService
with LabelsService
with MilestonesService
with PrioritiesService
with UsersAuthenticator
with ReferrerAuthenticator
with AccountFederationService

View File

@@ -32,6 +32,7 @@ import org.scalatra.i18n.Messages
class RepositoryViewerController extends RepositoryViewerControllerBase
with RepositoryService with AccountService with ActivityService with IssuesService with WebHookService with CommitsService
with LabelsService with MilestonesService with PrioritiesService
with ReadableUsersAuthenticator with ReferrerAuthenticator with WritableUsersAuthenticator with PullRequestService with CommitStatusService
with WebHookPullRequestService with WebHookPullRequestReviewCommentService with ProtectedBranchService

View File

@@ -11,7 +11,8 @@ import Implicits.request2Session
* It may be called many times in one request, so each method stores
* its result into the cache which available during a request.
*/
trait RequestCache extends SystemSettingsService with AccountService with IssuesService with RepositoryService {
trait RequestCache extends SystemSettingsService with AccountService with IssuesService with RepositoryService
with LabelsService with MilestonesService with PrioritiesService {
private implicit def context2Session(implicit context: Context): Session =
request2Session(context.request)

View File

@@ -35,8 +35,6 @@
@comments.map {
case comment: gitbucket.core.model.IssueComment => {
@comment.action match {
case "close" => {
}
case "commit" => {
@defining({
val (content, id) = " ([a-f0-9]{40})$".r.findFirstMatchIn(comment.content)

View File

@@ -4,7 +4,8 @@ import gitbucket.core.model._
import org.scalatest.FunSpec
class PullRequestServiceSpec extends FunSpec with ServiceSpecBase
with PullRequestService with IssuesService with AccountService with RepositoryService with CommitsService {
with PullRequestService with IssuesService with AccountService with RepositoryService with CommitsService
with LabelsService with MilestonesService with PrioritiesService {
def swap(r: (Issue, PullRequest)) = (r._2 -> r._1)

View File

@@ -45,7 +45,7 @@ trait ServiceSpecBase {
def user(name:String)(implicit s:Session):Account = AccountService.getAccountByUserName(name).get
lazy val dummyService = new RepositoryService with AccountService with IssuesService with PullRequestService
with CommitsService with CommitStatusService with LabelsService (){}
with CommitsService with CommitStatusService with LabelsService with MilestonesService with PrioritiesService (){}
def generateNewUserWithDBRepository(userName:String, repositoryName:String)(implicit s:Session):Account = {
val ac = AccountService.getAccountByUserName(userName).getOrElse(generateNewAccount(userName))

View File

@@ -6,7 +6,8 @@ import gitbucket.core.model.WebHookContentType
class WebHookServiceSpec extends FunSuite with ServiceSpecBase {
lazy val service = new WebHookPullRequestService with AccountService with RepositoryService with PullRequestService with IssuesService with CommitsService
lazy val service = new WebHookPullRequestService with AccountService with RepositoryService with PullRequestService
with IssuesService with CommitsService with LabelsService with MilestonesService with PrioritiesService
test("WebHookPullRequestService.getPullRequestsByRequestForWebhook") { withTestDB { implicit session =>
val user1 = generateNewUserWithDBRepository("user1","repo1")