diff --git a/build.sbt b/build.sbt index ff73868fb..28cfb4a9c 100644 --- a/build.sbt +++ b/build.sbt @@ -40,8 +40,8 @@ lazy val library = "dev.zio" %% "zio-schema" % "0.3.1", "dev.zio" %% "zio-schema-json" % "0.3.1", "org.apache.commons" % "commons-lang3" % "3.12.0", - "dev.zio" %% "zio-test" % "2.0.4" % IntegrationTest, - "dev.zio" %% "zio-test-sbt" % "2.0.4" % IntegrationTest + "dev.zio" %% "zio-test" % "2.0.4" % "it,test", + "dev.zio" %% "zio-test-sbt" % "2.0.4" % "it,test" ), testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework")) ) diff --git a/modules/example/src/main/scala/example/Main.scala b/modules/example/src/main/scala/example/Main.scala index 3750297aa..e3e2ee97d 100644 --- a/modules/example/src/main/scala/example/Main.scala +++ b/modules/example/src/main/scala/example/Main.scala @@ -3,7 +3,7 @@ package example import sttp.client3.httpclient.zio.HttpClientZioBackend import zio.elasticsearch.ElasticQuery._ import zio.elasticsearch.ElasticRequest.search -import zio.elasticsearch.{ElasticExecutor, IndexName} +import zio.elasticsearch.{ElasticExecutor, ElasticQuery, IndexName} import zio.{Scope, ZIO, ZIOAppArgs, ZIOAppDefault} // TODO : REMOVE CLASS BEFORE MERGE @@ -30,7 +30,7 @@ object Main extends ZIOAppDefault { // (matches("customer_gender", "MALE") and matches("day_of_week", "Monday")) or matches("customer_last_name", "Weber") // println(query2.asJsonBody) - val query = + val query: ElasticQuery = boolQuery() .must(matches("customer_gender", "MALE")) .must(matches("day_of_week", "Monday")) diff --git a/modules/library/src/test/scala/zio/elasticsearch/QueryDSLSpec.scala b/modules/library/src/test/scala/zio/elasticsearch/QueryDSLSpec.scala index 34dc70ecc..25c3ad94f 100644 --- a/modules/library/src/test/scala/zio/elasticsearch/QueryDSLSpec.scala +++ b/modules/library/src/test/scala/zio/elasticsearch/QueryDSLSpec.scala @@ -1,12 +1,13 @@ package zio.elasticsearch -import zio.test.{Assertion, ZIOSpecDefault, assert} +import zio.Scope import zio.elasticsearch.ElasticQuery._ import zio.json.ast.Json +import zio.test.{Assertion, Spec, TestEnvironment, ZIOSpecDefault, assert} object QueryDSLSpec extends ZIOSpecDefault { - override def spec = + override def spec: Spec[Environment with TestEnvironment with Scope, Any] = suite("Query DSL")( suite("Creating Elastic Query Class")( test("Successfully create Match Query using `matches` method") {