Integration test for Web API (#2578)
1 parent f20497e commit 8d8845536d9578ed5c7b7569e62db73b03345d36
@Naoki Takezoe Naoki Takezoe authored on 13 Dec 2020
GitHub committed on 13 Dec 2020
Showing 5 changed files
View
10
build.sbt
"org.testcontainers" % "mysql" % "1.14.3" % "test",
"org.testcontainers" % "postgresql" % "1.14.3" % "test",
"net.i2p.crypto" % "eddsa" % "0.3.0",
"is.tagomor.woothee" % "woothee-java" % "1.11.0",
"org.ec4j.core" % "ec4j-core" % "0.0.3"
"org.ec4j.core" % "ec4j-core" % "0.0.3",
"org.kohsuke" % "github-api" % "1.116" % "test"
)
 
// Compiler settings
scalacOptions := Seq("-deprecation", "-language:postfixOps", "-opt:l:method")
"org.eclipse.jetty" % "jetty-io" % JettyVersion % "executable",
"org.eclipse.jetty" % "jetty-util" % JettyVersion % "executable"
)
 
// Run package task before test to generate target/webapp for integration test
test in Test := {
_root_.sbt.Keys.`package`.value
(test in Test).value
}
 
val executableKey = TaskKey[File]("executable")
executableKey := {
import java.util.jar.Attributes.{Name => AttrName}
import java.util.jar.{Manifest => JarManifest}
View
1
■■■■
src/main/scala/gitbucket/core/api/ApiRepository.scala
val id = 0 // dummy id
val forks_count = forks
val watchers_count = watchers
val url = ApiPath(s"/api/v3/repos/${full_name}")
val http_url = ApiPath(s"/git/${full_name}.git")
val clone_url = ApiPath(s"/git/${full_name}.git")
val html_url = ApiPath(s"/${full_name}")
val ssh_url = Some(SshPath(s":${full_name}.git"))
}
View
src/test/scala/gitbucket/core/TestingGitBucketServer.scala 0 → 100644
View
src/test/scala/gitbucket/core/api/ApiIntegrationTest.scala 0 → 100644
View
src/test/scala/gitbucket/core/api/ApiSpecModels.scala