markusthoemmes closed pull request #3584: Refactor parts of the 
ElasticSearchRestClient.
URL: https://github.com/apache/incubator-openwhisk/pull/3584
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchLogStore.scala
 
b/common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchLogStore.scala
index 26f0cd3f30..1604faad3d 100644
--- 
a/common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchLogStore.scala
+++ 
b/common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchLogStore.scala
@@ -24,7 +24,8 @@ import akka.stream.scaladsl.Flow
 import akka.http.scaladsl.model._
 
 import whisk.core.entity.{ActivationLogs, Identity, WhiskActivation}
-import whisk.core.containerpool.logging.ElasticSearchJsonProtocol._
+import whisk.core.containerpool.logging.ElasticSearchRestClient._
+import 
whisk.core.containerpool.logging.ElasticSearchRestClient.ElasticSearchJsonProtocol._
 import whisk.core.ConfigKeys
 
 import scala.concurrent.{Future, Promise}
@@ -43,7 +44,7 @@ case class ElasticSearchLogFieldConfig(userLogs: String,
 case class ElasticSearchLogStoreConfig(protocol: String,
                                        host: String,
                                        port: Int,
-                                       path: String,
+                                       index: String,
                                        logSchema: ElasticSearchLogFieldConfig,
                                        requiredHeaders: Seq[String] = 
Seq.empty)
 
@@ -92,12 +93,12 @@ class ElasticSearchLogStore(
     val logQuery =
       s"_type: ${elasticSearchConfig.logSchema.userLogs} AND 
${elasticSearchConfig.logSchema.activationId}: ${activation.activationId}"
     val queryString = EsQueryString(logQuery)
-    val queryOrder = EsQueryOrder(elasticSearchConfig.logSchema.time, 
EsOrderAsc)
+    val queryOrder = EsQueryOrder(elasticSearchConfig.logSchema.time, 
EsOrder.Asc)
 
     EsQuery(queryString, Some(queryOrder))
   }
 
-  private def generatePath(user: Identity) = 
elasticSearchConfig.path.format(user.uuid.asString)
+  private def generatePath(user: Identity) = 
elasticSearchConfig.index.format(user.uuid.asString)
 
   override def fetchLogs(user: Identity, activation: WhiskActivation, request: 
HttpRequest): Future[ActivationLogs] = {
     val headers = extractRequiredHeaders(request.headers)
diff --git 
a/common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchRestClient.scala
 
b/common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchRestClient.scala
index 2f34c26da3..bf47f7b352 100644
--- 
a/common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchRestClient.scala
+++ 
b/common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchRestClient.scala
@@ -22,6 +22,7 @@ import scala.util.{Either, Try}
 
 import akka.actor.ActorSystem
 import akka.http.scaladsl.model._
+import akka.http.scaladsl.model.Uri.Path
 import akka.http.scaladsl.model.HttpMethods.{GET, POST}
 import akka.http.scaladsl.model.headers.Accept
 import akka.stream.scaladsl.Flow
@@ -33,122 +34,139 @@ import spray.json._
 
 import whisk.http.PoolingRestClient
 
-trait EsQueryMethod
-trait EsOrder
-trait EsRange
-trait EsAgg
-trait EsMatch
-
-// Schema of ES query operators
-case object EsOrderAsc extends EsOrder { override def toString = "asc" }
-case object EsOrderDesc extends EsOrder { override def toString = "desc" }
-case object EsRangeGte extends EsRange { override def toString = "gte" }
-case object EsRangeGt extends EsRange { override def toString = "gt" }
-case object EsRangeLte extends EsRange { override def toString = "lte" }
-case object EsRangeLt extends EsRange { override def toString = "lt" }
-case object EsAggMax extends EsAgg { override def toString = "max" }
-case object EsAggMin extends EsAgg { override def toString = "min" }
-case object EsMatchPhrase extends EsMatch { override def toString = "phrase" }
-case object EsMatchPhrasePrefix extends EsMatch { override def toString = 
"phrase_prefix" }
-
-// Schema of ES queries
-case class EsQueryAggs(aggField: String, agg: EsAgg, field: String)
-case class EsQueryRange(key: String, range: EsRange, value: String)
-case class EsQueryBoolMatch(key: String, value: String)
-case class EsQueryOrder(field: String, kind: EsOrder)
-case class EsQuerySize(size: Integer)
-case class EsQueryAll() extends EsQueryMethod
-case class EsQueryMust(matches: Vector[EsQueryBoolMatch], range: 
Option[EsQueryRange] = None) extends EsQueryMethod
-case class EsQueryMatch(field: String, value: String, matchType: 
Option[EsMatch] = None) extends EsQueryMethod
-case class EsQueryTerm(key: String, value: String) extends EsQueryMethod
-case class EsQueryString(queryString: String) extends EsQueryMethod
-case class EsQuery(query: EsQueryMethod,
-                   sort: Option[EsQueryOrder] = None,
-                   size: Option[EsQuerySize] = None,
-                   aggs: Option[EsQueryAggs] = None)
-
-// Schema of ES query results
-case class EsSearchHit(source: JsObject)
-case class EsSearchHits(hits: Vector[EsSearchHit])
-case class EsSearchResult(hits: EsSearchHits)
-
-object ElasticSearchJsonProtocol extends DefaultJsonProtocol {
-
-  implicit object EsQueryMatchJsonFormat extends RootJsonFormat[EsQueryMatch] {
-    def read(query: JsValue) = ???
-    def write(query: EsQueryMatch) = {
-      val matchQuery = Map("query" -> query.value.toJson) ++ 
query.matchType.map(m => "type" -> m.toString.toJson)
-      JsObject("match" -> JsObject(query.field -> matchQuery.toJson))
-    }
-  }
+object ElasticSearchRestClient {
 
-  implicit object EsQueryTermJsonFormat extends RootJsonFormat[EsQueryTerm] {
-    def read(query: JsValue) = ???
-    def write(query: EsQueryTerm) = JsObject("term" -> JsObject(query.key -> 
query.value.toJson))
+  trait EsQueryMethod
+
+  trait EsOrder
+  object EsOrder {
+    case object Asc extends EsOrder { override def toString = "asc" }
+    case object Desc extends EsOrder { override def toString = "desc" }
   }
 
-  implicit object EsQueryStringJsonFormat extends 
RootJsonFormat[EsQueryString] {
-    def read(query: JsValue) = ???
-    def write(query: EsQueryString) =
-      JsObject("query_string" -> JsObject("query" -> query.queryString.toJson))
+  trait EsRange
+  object EsRange {
+    case object Gte extends EsRange { override def toString = "gte" }
+    case object Gt extends EsRange { override def toString = "gt" }
+    case object Lte extends EsRange { override def toString = "lte" }
+    case object Lt extends EsRange { override def toString = "lt" }
   }
 
-  implicit object EsQueryRangeJsonFormat extends RootJsonFormat[EsQueryRange] {
-    def read(query: JsValue) = ???
-    def write(query: EsQueryRange) =
-      JsObject("range" -> JsObject(query.key -> JsObject(query.range.toString 
-> query.value.toJson)))
+  trait EsAggregation
+  object EsAggregation {
+    case object Max extends EsAggregation { override def toString = "max" }
+    case object Min extends EsAggregation { override def toString = "min" }
   }
 
-  implicit object EsQueryBoolMatchJsonFormat extends 
RootJsonFormat[EsQueryBoolMatch] {
-    def read(query: JsValue) = ???
-    def write(query: EsQueryBoolMatch) = JsObject("match" -> 
JsObject(query.key -> query.value.toJson))
+  trait EsMatch
+  object EsMatch {
+    case object Phrase extends EsMatch { override def toString = "phrase" }
+    case object PhrasePrefix extends EsMatch { override def toString = 
"phrase_prefix" }
   }
 
-  implicit object EsQueryMustJsonFormat extends RootJsonFormat[EsQueryMust] {
-    def read(query: JsValue) = ???
-    def write(query: EsQueryMust) = {
-      val boolQuery = Map("must" -> query.matches.toJson) ++ query.range.map(r 
=> "filter" -> r.toJson)
-      JsObject("bool" -> boolQuery.toJson)
+  // Schema of ES queries
+  case class EsQueryAggs(aggField: String, agg: EsAggregation, field: String)
+  case class EsQueryRange(key: String, range: EsRange, value: String)
+  case class EsQueryBoolMatch(key: String, value: String)
+  case class EsQueryOrder(field: String, kind: EsOrder)
+  case class EsQueryAll() extends EsQueryMethod
+  case class EsQueryMust(matches: Vector[EsQueryBoolMatch], range: 
Option[EsQueryRange] = None) extends EsQueryMethod
+  case class EsQueryMatch(field: String, value: String, matchType: 
Option[EsMatch] = None) extends EsQueryMethod
+  case class EsQueryTerm(key: String, value: String) extends EsQueryMethod
+  case class EsQueryString(queryString: String) extends EsQueryMethod
+  case class EsQuery(query: EsQueryMethod,
+                     sort: Option[EsQueryOrder] = None,
+                     size: Option[Int] = None,
+                     aggs: Option[EsQueryAggs] = None)
+
+  // Schema of ES query results
+  case class EsSearchHit(source: JsObject)
+  case class EsSearchHits(hits: Vector[EsSearchHit])
+  case class EsSearchResult(hits: EsSearchHits)
+
+  object ElasticSearchJsonProtocol extends DefaultJsonProtocol {
+
+    implicit object EsQueryMatchJsonFormat extends 
RootJsonFormat[EsQueryMatch] {
+      def read(query: JsValue) = ???
+
+      def write(query: EsQueryMatch) = {
+        val matchQuery = Map("query" -> query.value.toJson) ++ 
query.matchType.map(m => "type" -> m.toString.toJson)
+        JsObject("match" -> JsObject(query.field -> matchQuery.toJson))
+      }
     }
-  }
 
-  implicit object EsQueryOrderJsonFormat extends RootJsonFormat[EsQueryOrder] {
-    def read(query: JsValue) = ???
-    def write(query: EsQueryOrder) =
-      JsArray(JsObject(query.field -> JsObject("order" -> 
query.kind.toString.toJson)))
-  }
+    implicit object EsQueryTermJsonFormat extends RootJsonFormat[EsQueryTerm] {
+      def read(query: JsValue) = ???
 
-  implicit object EsQuerySizeJsonFormat extends RootJsonFormat[EsQuerySize] {
-    def read(query: JsValue) = ???
-    def write(query: EsQuerySize) = JsNumber(query.size)
-  }
+      def write(query: EsQueryTerm) = JsObject("term" -> JsObject(query.key -> 
query.value.toJson))
+    }
 
-  implicit object EsQueryAggsJsonFormat extends RootJsonFormat[EsQueryAggs] {
-    def read(query: JsValue) = ???
-    def write(query: EsQueryAggs) =
-      JsObject(query.aggField -> JsObject(query.agg.toString -> 
JsObject("field" -> query.field.toJson)))
-  }
+    implicit object EsQueryStringJsonFormat extends 
RootJsonFormat[EsQueryString] {
+      def read(query: JsValue) = ???
 
-  implicit object EsQueryAllJsonFormat extends RootJsonFormat[EsQueryAll] {
-    def read(query: JsValue) = ???
-    def write(query: EsQueryAll) = JsObject("match_all" -> JsObject())
-  }
+      def write(query: EsQueryString) =
+        JsObject("query_string" -> JsObject("query" -> 
query.queryString.toJson))
+    }
 
-  implicit object EsQueryMethod extends RootJsonFormat[EsQueryMethod] {
-    def read(query: JsValue) = ???
-    def write(method: EsQueryMethod) = method match {
-      case queryTerm: EsQueryTerm     => queryTerm.toJson
-      case queryString: EsQueryString => queryString.toJson
-      case queryMatch: EsQueryMatch   => queryMatch.toJson
-      case queryMust: EsQueryMust     => queryMust.toJson
-      case queryAll: EsQueryAll       => queryAll.toJson
+    implicit object EsQueryRangeJsonFormat extends 
RootJsonFormat[EsQueryRange] {
+      def read(query: JsValue) = ???
+
+      def write(query: EsQueryRange) =
+        JsObject("range" -> JsObject(query.key -> 
JsObject(query.range.toString -> query.value.toJson)))
     }
-  }
 
-  implicit val esQueryFormat = jsonFormat4(EsQuery.apply)
-  implicit val esSearchHitFormat = jsonFormat(EsSearchHit.apply _, "_source")
-  implicit val esSearchHitsFormat = jsonFormat1(EsSearchHits.apply)
-  implicit val esSearchResultFormat = jsonFormat1(EsSearchResult.apply)
+    implicit object EsQueryBoolMatchJsonFormat extends 
RootJsonFormat[EsQueryBoolMatch] {
+      def read(query: JsValue) = ???
+
+      def write(query: EsQueryBoolMatch) = JsObject("match" -> 
JsObject(query.key -> query.value.toJson))
+    }
+
+    implicit object EsQueryMustJsonFormat extends RootJsonFormat[EsQueryMust] {
+      def read(query: JsValue) = ???
+
+      def write(query: EsQueryMust) = {
+        val boolQuery = Map("must" -> query.matches.toJson) ++ 
query.range.map(r => "filter" -> r.toJson)
+        JsObject("bool" -> boolQuery.toJson)
+      }
+    }
+
+    implicit object EsQueryOrderJsonFormat extends 
RootJsonFormat[EsQueryOrder] {
+      def read(query: JsValue) = ???
+
+      def write(query: EsQueryOrder) =
+        JsArray(JsObject(query.field -> JsObject("order" -> 
query.kind.toString.toJson)))
+    }
+
+    implicit object EsQueryAggsJsonFormat extends RootJsonFormat[EsQueryAggs] {
+      def read(query: JsValue) = ???
+
+      def write(query: EsQueryAggs) =
+        JsObject(query.aggField -> JsObject(query.agg.toString -> 
JsObject("field" -> query.field.toJson)))
+    }
+
+    implicit object EsQueryAllJsonFormat extends RootJsonFormat[EsQueryAll] {
+      def read(query: JsValue) = ???
+
+      def write(query: EsQueryAll) = JsObject("match_all" -> JsObject())
+    }
+
+    implicit object EsQueryMethod extends RootJsonFormat[EsQueryMethod] {
+      def read(query: JsValue) = ???
+
+      def write(method: EsQueryMethod) = method match {
+        case queryTerm: EsQueryTerm     => queryTerm.toJson
+        case queryString: EsQueryString => queryString.toJson
+        case queryMatch: EsQueryMatch   => queryMatch.toJson
+        case queryMust: EsQueryMust     => queryMust.toJson
+        case queryAll: EsQueryAll       => queryAll.toJson
+      }
+    }
+
+    implicit val esQueryFormat = jsonFormat4(EsQuery.apply)
+    implicit val esSearchHitFormat = jsonFormat(EsSearchHit.apply _, "_source")
+    implicit val esSearchHitsFormat = jsonFormat1(EsSearchHits.apply)
+    implicit val esSearchResultFormat = jsonFormat1(EsSearchResult.apply)
+  }
 }
 
 class ElasticSearchRestClient(
@@ -159,7 +177,8 @@ class ElasticSearchRestClient(
   implicit system: ActorSystem)
     extends PoolingRestClient(protocol, host, port, 16 * 1024, httpFlow) {
 
-  import ElasticSearchJsonProtocol._
+  import ElasticSearchRestClient._
+  import ElasticSearchRestClient.ElasticSearchJsonProtocol._
 
   private val baseHeaders: List[HttpHeader] = 
List(Accept(MediaTypes.`application/json`))
 
@@ -174,5 +193,6 @@ class ElasticSearchRestClient(
   def search[T: RootJsonReader](index: String,
                                 payload: EsQuery = EsQuery(EsQueryAll()),
                                 headers: List[HttpHeader] = List.empty): 
Future[Either[StatusCode, T]] =
-    requestJson[T](mkJsonRequest(POST, Uri(index), payload.toJson.asJsObject, 
baseHeaders ++ headers))
+    requestJson[T](
+      mkJsonRequest(POST, Uri().withPath(Path / index / "_search"), 
payload.toJson.asJsObject, baseHeaders ++ headers))
 }
diff --git 
a/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala
 
b/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala
index ebd8c8c2c9..1ef2da477b 100644
--- 
a/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala
+++ 
b/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala
@@ -64,7 +64,7 @@ class ElasticSearchLogStoreTests
       "https",
       "host",
       443,
-      "/whisk_user_logs/_search",
+      "whisk_user_logs",
       defaultLogSchema,
       Seq("x-auth-token", "x-auth-project-id"))
 
diff --git 
a/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchRestClientTests.scala
 
b/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchRestClientTests.scala
index 74eccdffa6..e1264c0f52 100644
--- 
a/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchRestClientTests.scala
+++ 
b/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchRestClientTests.scala
@@ -18,12 +18,10 @@
 package whisk.core.containerpool.logging
 
 import spray.json._
-
 import org.junit.runner.RunWith
 import org.scalatest.{FlatSpecLike, Matchers}
 import org.scalatest.concurrent.ScalaFutures
 import org.scalatest.junit.JUnitRunner
-
 import akka.NotUsed
 import akka.actor.ActorSystem
 import akka.http.scaladsl.model._
@@ -32,10 +30,10 @@ import akka.stream.scaladsl.Flow
 import akka.stream.ActorMaterializer
 import akka.testkit.TestKit
 import akka.http.scaladsl.model.HttpMethods.POST
-
+import akka.http.scaladsl.model.Uri.Path
 import common.StreamLogging
-
-import whisk.core.containerpool.logging.ElasticSearchJsonProtocol._
+import whisk.core.containerpool.logging.ElasticSearchRestClient._
+import 
whisk.core.containerpool.logging.ElasticSearchRestClient.ElasticSearchJsonProtocol._
 
 import scala.concurrent.duration._
 import scala.concurrent.{Await, ExecutionContext, Future, Promise}
@@ -52,13 +50,15 @@ class ElasticSearchRestClientTests
   implicit val ec: ExecutionContext = system.dispatcher
   implicit val materializer: ActorMaterializer = ActorMaterializer()
 
+  private val defaultIndex = "testIndex"
   private val defaultResponseSource =
     
"""{"stream":"stdout","activationId":"197d60b33137424ebd60b33137d24ea3","action":"guest/someAction","@version":"1","@timestamp":"2018-03-27T15:48:09.112Z","type":"user_logs","tenant":"19bc46b1-71f6-4ed5-8c54-816aa4f8c502","message":"namespace
     : [email protected]\n","time_date":"2018-03-27T15:48:08.716152793Z"}"""
   private val defaultResponse =
-    
s"""{"took":2,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1375,"max_score":1.0,"hits":[{"_index":"whisk_user_logs","_type":"user_logs","_id":"AWJoJSwAMGbzgxiD1jr9","_score":1.0,"_source":$defaultResponseSource}]}}"""
+    
s"""{"took":2,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1375,"max_score":1.0,"hits":[{"_index":"$defaultIndex","_type":"user_logs","_id":"AWJoJSwAMGbzgxiD1jr9","_score":1.0,"_source":$defaultResponseSource}]}}"""
   private val defaultHttpResponse = HttpResponse(entity = 
HttpEntity(ContentTypes.`application/json`, defaultResponse))
   private val defaultHttpRequest = HttpRequest(
     POST,
+    Uri().withPath(Path / defaultIndex / "_search"),
     headers = List(Accept(MediaTypes.`application/json`)),
     entity = HttpEntity(ContentTypes.`application/json`, 
EsQuery(EsQueryAll()).toJson.toString))
 
@@ -90,7 +90,7 @@ class ElasticSearchRestClientTests
                   JsObject("match" -> JsObject("someKey2" -> 
JsString("someValue2")))))))
 
     // Test must with ranges
-    Seq((EsRangeGte, "gte"), (EsRangeGt, "gt"), (EsRangeLte, "lte"), 
(EsRangeLt, "lt")).foreach {
+    Seq((EsRange.Gte, "gte"), (EsRange.Gt, "gt"), (EsRange.Lte, "lte"), 
(EsRange.Lt, "lt")).foreach {
       case (rangeArg, rangeValue) =>
         val queryRange = EsQueryRange("someKey", rangeArg, "someValue")
         val queryTerms = Vector(EsQueryBoolMatch("someKey1", "someValue1"), 
EsQueryBoolMatch("someKey2", "someValue2"))
@@ -113,7 +113,7 @@ class ElasticSearchRestClientTests
   }
 
   it should "construct a query with aggregations" in {
-    Seq((EsAggMax, "max"), (EsAggMin, "min")).foreach {
+    Seq((EsAggregation.Max, "max"), (EsAggregation.Min, "min")).foreach {
       case (aggArg, aggValue) =>
         val queryAgg = EsQueryAggs("someAgg", aggArg, "someField")
 
@@ -130,7 +130,7 @@ class ElasticSearchRestClientTests
       "query" -> JsObject("match" -> JsObject("someField" -> JsObject("query" 
-> "someValue".toJson))))
 
     // Test match with types
-    Seq((EsMatchPhrase, "phrase"), (EsMatchPhrasePrefix, 
"phrase_prefix")).foreach {
+    Seq((EsMatch.Phrase, "phrase"), (EsMatch.PhrasePrefix, 
"phrase_prefix")).foreach {
       case (typeArg, typeValue) =>
         val queryMatch = EsQueryMatch("someField", "someValue", Some(typeArg))
 
@@ -154,7 +154,7 @@ class ElasticSearchRestClientTests
   }
 
   it should "construct a query with order" in {
-    Seq((EsOrderAsc, "asc"), (EsOrderDesc, "desc")).foreach {
+    Seq((EsOrder.Asc, "asc"), (EsOrder.Desc, "desc")).foreach {
       case (orderArg, orderValue) =>
         val queryOrder = EsQueryOrder("someField", orderArg)
 
@@ -165,7 +165,7 @@ class ElasticSearchRestClientTests
   }
 
   it should "construct query with size" in {
-    val querySize = EsQuerySize(1)
+    val querySize = 1
 
     EsQuery(EsQueryAll(), size = Some(querySize)).toJson shouldBe JsObject(
       "query" -> JsObject("match_all" -> JsObject()),
@@ -175,13 +175,13 @@ class ElasticSearchRestClientTests
   it should "error when search response does not match expected type" in {
     val esClient = new ElasticSearchRestClient("https", "host", 443, 
Some(testFlow(httpRequest = defaultHttpRequest)))
 
-    a[RuntimeException] should be thrownBy 
await(esClient.search[JsObject]("/"))
+    a[RuntimeException] should be thrownBy 
await(esClient.search[JsObject](defaultIndex))
   }
 
   it should "parse search response into EsSearchResult" in {
     val esClient =
       new ElasticSearchRestClient("https", "host", 443, 
Some(testFlow(defaultHttpResponse, defaultHttpRequest)))
-    val response = await(esClient.search[EsSearchResult]("/"))
+    val response = await(esClient.search[EsSearchResult](defaultIndex))
 
     response shouldBe 'right
     response.right.get.hits.hits should have size 1
@@ -191,7 +191,7 @@ class ElasticSearchRestClientTests
   it should "return status code when HTTP error occurs" in {
     val httpResponse = HttpResponse(StatusCodes.InternalServerError)
     val esClient = new ElasticSearchRestClient("https", "host", 443, 
Some(testFlow(httpResponse, defaultHttpRequest)))
-    val response = await(esClient.search[JsObject]("/"))
+    val response = await(esClient.search[JsObject](defaultIndex))
 
     response shouldBe 'left
     response.left.get shouldBe StatusCodes.InternalServerError


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to