This commit is contained in:
parent
414e71f3ae
commit
56f21768b0
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM openjdk:11-jre
|
||||
|
||||
ENV APPLICATION_USER ktor
|
||||
RUN useradd $APPLICATION_USER
|
||||
|
||||
RUN mkdir /app
|
||||
RUN chown -R $APPLICATION_USER /app
|
||||
|
||||
USER $APPLICATION_USER
|
||||
|
||||
COPY ./build/libs/output-service-rdb.jar /app/output-service-rdb.jar
|
||||
WORKDIR /app
|
||||
|
||||
CMD ["java", "-server", "-XX:+UnlockExperimentalVMOptions", "-XX:InitialRAMFraction=2", "-XX:MinRAMFraction=2", "-XX:MaxRAMFraction=2", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-jar", "benchmark-service.jar"]
|
@ -1,21 +0,0 @@
|
||||
package com.kmlabz.birbnetes
|
||||
|
||||
import io.ktor.application.*
|
||||
import io.ktor.response.*
|
||||
import io.ktor.request.*
|
||||
import io.ktor.routing.*
|
||||
import io.ktor.http.*
|
||||
import kotlin.test.*
|
||||
import io.ktor.server.testing.*
|
||||
|
||||
class ApplicationTest {
|
||||
@Test
|
||||
fun testRoot() {
|
||||
withTestApplication({ module(testing = true) }) {
|
||||
handleRequest(HttpMethod.Get, "/").apply {
|
||||
assertEquals(HttpStatusCode.OK, response.status())
|
||||
assertEquals("HELLO WORLD!", response.content)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user