test: add WebHost API test-host coverage for health/auth, script CRUD, subtoken access, and timeout handling

This commit is contained in:
2026-02-24 23:01:31 +08:00
parent cdc91d7ffd
commit 8824b43a99
3 changed files with 223 additions and 2 deletions

View File

@@ -22,6 +22,9 @@ dependencies {
implementation("io.ktor:ktor-server-core-jvm:2.3.13")
implementation("io.ktor:ktor-server-netty-jvm:2.3.13")
runtimeOnly("ch.qos.logback:logback-classic:1.5.18")
testImplementation(kotlin("test"))
testImplementation("io.ktor:ktor-server-test-host-jvm:2.3.13")
}
kotlin {
@@ -32,6 +35,10 @@ application {
mainClass.set("work.slhaf.hub.WebHostKt")
}
tasks.test {
useJUnitPlatform()
}
val runCli by tasks.registering(JavaExec::class) {
group = "application"
description = "Run the script CLI host"