|
@@ -94,13 +94,13 @@ class BatchServletSpec extends ScalatraSuite with FunSpecLike with BeforeAndAfte
|
|
|
}, Duration(10, TimeUnit.SECONDS))
|
|
}, Duration(10, TimeUnit.SECONDS))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- get("/0") {
|
|
|
|
|
|
|
+ get("/0?from=0&size=1000") {
|
|
|
status should equal (200)
|
|
status should equal (200)
|
|
|
header("Content-Type") should include("application/json")
|
|
header("Content-Type") should include("application/json")
|
|
|
val parsedBody = parse(body)
|
|
val parsedBody = parse(body)
|
|
|
parsedBody \ "id" should equal (JInt(0))
|
|
parsedBody \ "id" should equal (JInt(0))
|
|
|
parsedBody \ "state" should equal (JString("success"))
|
|
parsedBody \ "state" should equal (JString("success"))
|
|
|
- (parsedBody \ "lines").extract[List[String]] should contain ("hello world")
|
|
|
|
|
|
|
+ (parsedBody \ "log").extract[List[String]] should contain ("hello world")
|
|
|
|
|
|
|
|
val batch = batchManager.getBatch(0)
|
|
val batch = batchManager.getBatch(0)
|
|
|
batch should be (defined)
|
|
batch should be (defined)
|