diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/wiring/IdentitiesModule.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/wiring/IdentitiesModule.scala index 1ffe8f7e94..ca34895d1a 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/wiring/IdentitiesModule.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/wiring/IdentitiesModule.scala @@ -12,7 +12,7 @@ import ch.epfl.bluebrain.nexus.delta.routes.IdentitiesRoutes import ch.epfl.bluebrain.nexus.delta.sdk.PriorityRoute import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck import ch.epfl.bluebrain.nexus.delta.sdk.auth.{AuthTokenProvider, OpenIdAuthService} -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClient +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClient import ch.epfl.bluebrain.nexus.delta.sdk.identities.{Identities, IdentitiesImpl} import ch.epfl.bluebrain.nexus.delta.sdk.model.BaseUri import ch.epfl.bluebrain.nexus.delta.sdk.provisioning.ProjectProvisioning diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/wiring/RealmsModule.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/wiring/RealmsModule.scala index 750fc161ef..7bcbb2b8dc 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/wiring/RealmsModule.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/wiring/RealmsModule.scala @@ -5,6 +5,7 @@ import akka.http.scaladsl.model.{HttpRequest, Uri} import cats.effect.{Clock, IO} import ch.epfl.bluebrain.nexus.delta.Main.pluginsMaxPriority import ch.epfl.bluebrain.nexus.delta.config.AppConfig +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClient import ch.epfl.bluebrain.nexus.delta.kernel.utils.ClasspathResourceLoader import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.contexts import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.{ContextValue, RemoteContextResolution} @@ -12,7 +13,6 @@ import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.routes.RealmsRoutes import ch.epfl.bluebrain.nexus.delta.sdk._ import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClient import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities import ch.epfl.bluebrain.nexus.delta.sdk.model.MetadataContextValue import ch.epfl.bluebrain.nexus.delta.sdk.realms.{Realms, RealmsImpl} diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClient.scala b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClient.scala similarity index 98% rename from delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClient.scala rename to delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClient.scala index 1d5c73b656..f1a04653e3 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClient.scala +++ b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClient.scala @@ -1,4 +1,4 @@ -package ch.epfl.bluebrain.nexus.delta.sdk.http +package ch.epfl.bluebrain.nexus.delta.kernel.http import akka.actor.ActorSystem import akka.http.javadsl.model.headers.{AcceptEncoding, HttpEncodingRange} @@ -15,7 +15,7 @@ import ch.epfl.bluebrain.nexus.delta.kernel.AkkaSource import ch.epfl.bluebrain.nexus.delta.kernel.utils.IOFuture import ch.epfl.bluebrain.nexus.delta.kernel.utils.IOFuture.defaultCancelable import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling._ -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError._ +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError._ import ch.epfl.bluebrain.nexus.delta.kernel.syntax._ import io.circe.{Decoder, Json} diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientConfig.scala b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClientConfig.scala similarity index 93% rename from delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientConfig.scala rename to delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClientConfig.scala index 8357f1662b..267319a08d 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientConfig.scala +++ b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClientConfig.scala @@ -1,7 +1,7 @@ -package ch.epfl.bluebrain.nexus.delta.sdk.http +package ch.epfl.bluebrain.nexus.delta.kernel.http +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientConfig.logger import ch.epfl.bluebrain.nexus.delta.kernel.{Logger, RetryStrategy, RetryStrategyConfig} -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientConfig.logger import pureconfig.ConfigReader import pureconfig.error.CannotConvert import pureconfig.generic.semiauto.deriveReader diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientError.scala b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClientError.scala similarity index 99% rename from delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientError.scala rename to delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClientError.scala index 730561c23a..5d13e04196 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientError.scala +++ b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClientError.scala @@ -1,4 +1,4 @@ -package ch.epfl.bluebrain.nexus.delta.sdk.http +package ch.epfl.bluebrain.nexus.delta.kernel.http import akka.http.scaladsl.model.headers.HttpEncoding import akka.http.scaladsl.model.{HttpHeader, HttpRequest, StatusCode, StatusCodes} diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientWorthRetry.scala b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClientWorthRetry.scala similarity index 87% rename from delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientWorthRetry.scala rename to delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClientWorthRetry.scala index 108e704e80..a6af48fca6 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientWorthRetry.scala +++ b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClientWorthRetry.scala @@ -1,7 +1,7 @@ -package ch.epfl.bluebrain.nexus.delta.sdk.http +package ch.epfl.bluebrain.nexus.delta.kernel.http import akka.http.scaladsl.model.StatusCodes.GatewayTimeout -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.{HttpConnectError, HttpServerStatusError, HttpTimeoutError, HttpUnexpectedError} +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.{HttpConnectError, HttpServerStatusError, HttpTimeoutError, HttpUnexpectedError} trait HttpClientWorthRetry extends (HttpClientError => Boolean) diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientSpec.scala b/delta/kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClientSpec.scala similarity index 63% rename from delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientSpec.scala rename to delta/kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClientSpec.scala index f4043395ba..f648f755b6 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientSpec.scala +++ b/delta/kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel/http/HttpClientSpec.scala @@ -1,4 +1,4 @@ -package ch.epfl.bluebrain.nexus.delta.sdk.http +package ch.epfl.bluebrain.nexus.delta.kernel.http import akka.actor.ActorSystem import akka.http.scaladsl.model.MediaTypes.{`application/json`, `application/octet-stream`} @@ -8,48 +8,48 @@ import akka.stream.scaladsl.Source import akka.testkit.TestKit import akka.util.ByteString import cats.effect.IO -import ch.epfl.bluebrain.nexus.delta.kernel.RetryStrategyConfig.OnceStrategyConfig +import cats.effect.unsafe.implicits._ import ch.epfl.bluebrain.nexus.delta.kernel.AkkaSource -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClient.HttpSingleRequest -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.{HttpClientStatusError, HttpSerializationError, HttpServerStatusError, HttpUnexpectedError} -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientSpec.{Count, Value} -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientWorthRetry.onServerError -import ch.epfl.bluebrain.nexus.delta.sdk.syntax._ -import ch.epfl.bluebrain.nexus.testkit.CirceLiteral -import ch.epfl.bluebrain.nexus.testkit.scalatest.EitherValues -import ch.epfl.bluebrain.nexus.testkit.scalatest.ce.CatsEffectSpec +import ch.epfl.bluebrain.nexus.delta.kernel.RetryStrategyConfig.OnceStrategyConfig +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClient.HttpSingleRequest +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.{HttpClientStatusError, HttpSerializationError, HttpServerStatusError, HttpUnexpectedError} +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientSpec.{Count, Value} +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientWorthRetry.onServerError import io.circe.generic.semiauto._ +import io.circe.literal._ import io.circe.parser.parse import io.circe.syntax._ import io.circe.{Decoder, Encoder, Json} -import org.scalatest.BeforeAndAfterEach -import org.scalatest.concurrent.ScalaFutures +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AsyncWordSpecLike +import org.scalatest.{Assertion, BeforeAndAfterEach} import java.util.concurrent.atomic.AtomicInteger +import scala.concurrent.Future import scala.concurrent.duration._ class HttpClientSpec extends TestKit(ActorSystem("HttpClientSpec")) - with CatsEffectSpec - with CirceLiteral - with ScalaFutures + with AsyncWordSpecLike with BeforeAndAfterEach - with EitherValues { + with Matchers { + + implicit def ioToFutureAssertion(io: IO[Assertion]): Future[Assertion] = io.unsafeToFuture() implicit private val config: HttpClientConfig = HttpClientConfig(OnceStrategyConfig(200.millis), onServerError, false) private val value1 = Value("first", 1, deprecated = false) private val value2 = Value("second", 2, deprecated = true) - private val baseUri = Uri("http://localhost/v1") - private val getUri = baseUri / s"values/first" + private val baseUri = "http://localhost/v1" + private val getUri = Uri(s"$baseUri/values/first") private val reqGetValue = HttpRequest(uri = getUri) private val count = Count() - private val streamUri = baseUri / "values/events" + private val streamUri = Uri(s"$baseUri/values/events") private val reqStreamValues = HttpRequest(uri = streamUri) - private val clientErrorUri = baseUri / "values/errors/client" + private val clientErrorUri = Uri(s"$baseUri/values/errors/client") private val reqClientError = HttpRequest(uri = clientErrorUri) - private val serverErrorUri = baseUri / "values/errors/server" + private val serverErrorUri = Uri(s"$baseUri/values/errors/server") private val reqServerError = HttpRequest(uri = serverErrorUri) private def toSource(values: List[Json]): AkkaSource = @@ -86,36 +86,57 @@ class HttpClientSpec val client = HttpClient(httpSingleReq) "return the Value response" in { - client.fromJsonTo[Value](reqGetValue).accepted shouldEqual value1 - count.values shouldEqual Count(reqGetValue = 1).values + client.fromJsonTo[Value](reqGetValue).map { obtained => + obtained shouldEqual value1 + count.values shouldEqual Count(reqGetValue = 1).values + } } "return the AkkaSource response" in { - val stream = client.toDataBytes(reqStreamValues).accepted - stream - .runFold(Vector.empty[Value]) { (acc, c) => acc :+ parse(c.utf8String).rightValue.as[Value].rightValue } - .futureValue shouldEqual Vector(value1, value2) - count.values shouldEqual Count(reqStreamValues = 1).values + def parseValue(value: String) = + parse(value).flatMap(_.as[Value]).getOrElse(throw new IllegalStateException("Could not be parsed to value")) + + def sourceToVector(source: AkkaSource) = source + .runFold(Vector.empty[Value]) { (acc, c) => acc :+ parseValue(c.utf8String) } + for { + source <- client.toDataBytes(reqStreamValues) + values <- IO.fromFuture(IO.delay(sourceToVector(source))) + } yield { + values shouldEqual Vector(value1, value2) + count.values shouldEqual Count(reqStreamValues = 1).values + } } "fail Decoding the Int response" in { - client.fromJsonTo[Int](reqGetValue).rejectedWith[HttpSerializationError] - count.values shouldEqual Count(reqGetValue = 1).values + recoverToSucceededIf[HttpSerializationError] { + client.fromJsonTo[Int](reqGetValue).map(_ => succeed) + }.map { _ => + count.values shouldEqual Count(reqGetValue = 1).values + } } "fail with HttpUnexpectedError while retrying" in { - client.toJson(HttpRequest(uri = "http://other.com")).rejectedWith[HttpUnexpectedError] - count.values shouldEqual Count(reqOtherError = 2).values + recoverToSucceededIf[HttpUnexpectedError] { + client.toJson(HttpRequest(uri = "http://other.com")).map(_ => succeed) + }.map { _ => + count.values shouldEqual Count(reqOtherError = 2).values + } } "fail with HttpServerStatusError while retrying" in { - client.toJson(reqServerError).rejectedWith[HttpServerStatusError] - count.values shouldEqual Count(reqServerError = 2).values + recoverToSucceededIf[HttpServerStatusError] { + client.toJson(reqServerError).map(_ => succeed) + }.map { _ => + count.values shouldEqual Count(reqServerError = 2).values + } } "fail with HttpClientStatusError" in { - client.toJson(reqClientError).rejectedWith[HttpClientStatusError] - count.values shouldEqual Count(reqClientError = 1).values + recoverToSucceededIf[HttpClientStatusError] { + client.toJson(reqClientError).map(_ => succeed) + }.map { _ => + count.values shouldEqual Count(reqClientError = 1).values + } } } diff --git a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/BlazegraphErrorParser.scala b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/BlazegraphErrorParser.scala index 142448e913..198dd95b07 100644 --- a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/BlazegraphErrorParser.scala +++ b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/BlazegraphErrorParser.scala @@ -2,7 +2,7 @@ package ch.epfl.bluebrain.nexus.delta.plugins.blazegraph import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.SparqlClientError import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.SparqlClientError.WrappedHttpClientError -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError object BlazegraphErrorParser { diff --git a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/BlazegraphPluginModule.scala b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/BlazegraphPluginModule.scala index ef3831a9a8..094a067966 100644 --- a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/BlazegraphPluginModule.scala +++ b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/BlazegraphPluginModule.scala @@ -3,6 +3,7 @@ package ch.epfl.bluebrain.nexus.delta.plugins.blazegraph import akka.actor.ActorSystem import cats.effect.{Clock, IO} import ch.epfl.bluebrain.nexus.delta.kernel.dependency.ServiceDependency +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientConfig} import ch.epfl.bluebrain.nexus.delta.kernel.utils.{ClasspathResourceLoader, UUIDF} import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.BlazegraphClient import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.config.BlazegraphViewsConfig @@ -19,7 +20,6 @@ import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck import ch.epfl.bluebrain.nexus.delta.sdk.deletion.ProjectDeletionTask import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaSchemeDirectives import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientConfig} import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.ServiceAccount import ch.epfl.bluebrain.nexus.delta.sdk.model._ diff --git a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/BlazegraphClient.scala b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/BlazegraphClient.scala index f2472d0e51..f641b03cee 100644 --- a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/BlazegraphClient.scala +++ b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/BlazegraphClient.scala @@ -12,13 +12,13 @@ import cats.effect.IO import cats.syntax.all._ import ch.epfl.bluebrain.nexus.delta.kernel.dependency.ComponentDescription.ServiceDescription import ch.epfl.bluebrain.nexus.delta.kernel.dependency.ComponentDescription.ServiceDescription.ResolvedServiceDescription +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientError} import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.BlazegraphClient.timeoutHeader import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.SparqlClientError.{InvalidCountRequest, WrappedHttpClientError} import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.SparqlQueryResponseType.{Aux, SparqlResultsJson} import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.config.BlazegraphViewsConfig.Credentials import ch.epfl.bluebrain.nexus.delta.rdf.query.SparqlQuery import ch.epfl.bluebrain.nexus.delta.rdf.query.SparqlQuery.SparqlConstructQuery -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientError} import ch.epfl.bluebrain.nexus.delta.sdk.syntax._ import scala.concurrent.duration._ diff --git a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlClient.scala b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlClient.scala index aa354cf053..d8eb36534e 100644 --- a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlClient.scala +++ b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlClient.scala @@ -7,13 +7,13 @@ import akka.http.scaladsl.model._ import akka.http.scaladsl.model.headers.{Accept, HttpCredentials} import cats.effect.IO import cats.syntax.all._ +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientError} import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.SparqlClientError.{InvalidUpdateRequest, WrappedHttpClientError} import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.SparqlQueryResponse.{SparqlJsonLdResponse, SparqlNTriplesResponse, SparqlRdfXmlResponse, SparqlResultsResponse, SparqlXmlResultsResponse} import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.SparqlQueryResponseType._ import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.BNode import ch.epfl.bluebrain.nexus.delta.rdf.graph.NTriples import ch.epfl.bluebrain.nexus.delta.rdf.query.SparqlQuery -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientError} import ch.epfl.bluebrain.nexus.delta.sdk.syntax._ import io.circe.Json import io.circe.syntax._ diff --git a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlClientError.scala b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlClientError.scala index fa99229459..6056ae296f 100644 --- a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlClientError.scala +++ b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlClientError.scala @@ -1,6 +1,6 @@ package ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError /** * Error that can occur when using an [[SparqlClient]] diff --git a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/config/BlazegraphViewsConfig.scala b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/config/BlazegraphViewsConfig.scala index 49590bfe36..21ff38db67 100644 --- a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/config/BlazegraphViewsConfig.scala +++ b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/config/BlazegraphViewsConfig.scala @@ -5,7 +5,7 @@ import ch.epfl.bluebrain.nexus.delta.kernel.Secret import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.config.BlazegraphViewsConfig.Credentials import ch.epfl.bluebrain.nexus.delta.sdk.Defaults import ch.epfl.bluebrain.nexus.delta.sdk.instances._ -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientConfig +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientConfig import ch.epfl.bluebrain.nexus.delta.sdk.model.search.PaginationConfig import ch.epfl.bluebrain.nexus.delta.sourcing.config.{BatchConfig, EventLogConfig} import com.typesafe.config.Config diff --git a/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/BlazegraphClientSetup.scala b/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/BlazegraphClientSetup.scala index 0c275685b1..97cb6831a3 100644 --- a/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/BlazegraphClientSetup.scala +++ b/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/BlazegraphClientSetup.scala @@ -3,8 +3,8 @@ package ch.epfl.bluebrain.nexus.delta.plugins.blazegraph import akka.actor.ActorSystem import cats.effect.{IO, Resource} import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.BlazegraphClient -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientSetup import ch.epfl.bluebrain.nexus.testkit.blazegraph.BlazegraphContainer +import ch.epfl.bluebrain.nexus.testkit.http.HttpClientSetup import munit.CatsEffectSuite import munit.catseffect.IOFixture diff --git a/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/BlazegraphClientSpec.scala b/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/BlazegraphClientSpec.scala index bfbe69c102..f03ef56217 100644 --- a/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/BlazegraphClientSpec.scala +++ b/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/BlazegraphClientSpec.scala @@ -18,8 +18,8 @@ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.query.SparqlQuery import ch.epfl.bluebrain.nexus.delta.rdf.query.SparqlQuery.SparqlConstructQuery import ch.epfl.bluebrain.nexus.delta.sdk.ConfigFixtures -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.{HttpClientStatusError, HttpServerStatusError} -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientConfig} +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.{HttpClientStatusError, HttpServerStatusError} +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientConfig} import ch.epfl.bluebrain.nexus.delta.sdk.syntax._ import ch.epfl.bluebrain.nexus.testkit.blazegraph.BlazegraphDocker import ch.epfl.bluebrain.nexus.testkit.scalatest.ce.CatsEffectSpec diff --git a/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsQuerySpec.scala b/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsQuerySpec.scala index 08f7e8a964..376973b5d3 100644 --- a/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsQuerySpec.scala +++ b/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsQuerySpec.scala @@ -7,6 +7,7 @@ import cats.data.NonEmptySet import cats.effect.IO import cats.syntax.all._ import ch.epfl.bluebrain.nexus.delta.kernel.RetryStrategyConfig.AlwaysGiveUp +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientConfig, HttpClientWorthRetry} import ch.epfl.bluebrain.nexus.delta.kernel.search.Pagination import ch.epfl.bluebrain.nexus.delta.kernel.utils.UUIDF import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.BlazegraphViewsQuery.BlazegraphQueryContext @@ -28,7 +29,6 @@ import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclSimpleCheck import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddress import ch.epfl.bluebrain.nexus.delta.sdk.error.ServiceError.AuthorizationFailed import ch.epfl.bluebrain.nexus.delta.sdk.generators.ProjectGen -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientConfig, HttpClientWorthRetry} import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller import ch.epfl.bluebrain.nexus.delta.sdk.implicits._ import ch.epfl.bluebrain.nexus.delta.sdk.model._ diff --git a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/CompositeViewsPluginModule.scala b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/CompositeViewsPluginModule.scala index 3f1a2fcb93..6fb54b10e9 100644 --- a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/CompositeViewsPluginModule.scala +++ b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/CompositeViewsPluginModule.scala @@ -2,6 +2,7 @@ package ch.epfl.bluebrain.nexus.delta.plugins.compositeviews import akka.actor.ActorSystem import cats.effect.{Clock, IO} +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientConfig} import ch.epfl.bluebrain.nexus.delta.kernel.utils.{ClasspathResourceLoader, UUIDF} import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.BlazegraphClient import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.model.DefaultProperties @@ -25,7 +26,6 @@ import ch.epfl.bluebrain.nexus.delta.sdk.auth.AuthTokenProvider import ch.epfl.bluebrain.nexus.delta.sdk.deletion.ProjectDeletionTask import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaSchemeDirectives import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientConfig} import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities import ch.epfl.bluebrain.nexus.delta.sdk.model._ import ch.epfl.bluebrain.nexus.delta.sdk.model.metrics.ScopedEventMetricEncoder diff --git a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/ElasticSearchQuery.scala b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/ElasticSearchQuery.scala index 35a1141c4e..7cb1712e7c 100644 --- a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/ElasticSearchQuery.scala +++ b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/ElasticSearchQuery.scala @@ -4,6 +4,7 @@ import akka.http.scaladsl.model.Uri import akka.http.scaladsl.model.Uri.Query import cats.effect.IO import cats.syntax.all._ +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.indexing.CompositeViewDef.ActiveViewDef import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.indexing.projectionIndex import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.model.CompositeViewProjection.ElasticSearchProjection @@ -11,7 +12,6 @@ import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.model.CompositeViewR import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchClient import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck import ch.epfl.bluebrain.nexus.delta.sdk.error.ServiceError.AuthorizationFailed -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller import ch.epfl.bluebrain.nexus.delta.sdk.model.IdSegment import ch.epfl.bluebrain.nexus.delta.sdk.model.search.SortList diff --git a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/ValidateCompositeView.scala b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/ValidateCompositeView.scala index 87e4cccada..53d7b6b1af 100644 --- a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/ValidateCompositeView.scala +++ b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/ValidateCompositeView.scala @@ -2,6 +2,8 @@ package ch.epfl.bluebrain.nexus.delta.plugins.compositeviews import cats.effect.IO import cats.syntax.all._ +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.HttpClientStatusError import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.client.DeltaClient import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.indexing.projectionIndex import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.model.CompositeViewProjection.{ElasticSearchProjection, SparqlProjection} @@ -10,8 +12,6 @@ import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.model.CompositeViewS import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.model.{CompositeViewProjection, CompositeViewSource, CompositeViewValue} import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.{ElasticSearchClient, IndexLabel} import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.HttpClientStatusError import ch.epfl.bluebrain.nexus.delta.sdk.model.BaseUri import ch.epfl.bluebrain.nexus.delta.sdk.permissions.Permissions.events import ch.epfl.bluebrain.nexus.delta.sdk.permissions.model.Permission diff --git a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClient.scala b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClient.scala index c24c5ee0f0..6b734da612 100644 --- a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClient.scala +++ b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClient.scala @@ -9,14 +9,14 @@ import akka.http.scaladsl.model.{HttpRequest, HttpResponse, StatusCodes} import akka.stream.alpakka.sse.scaladsl.EventSource import cats.effect.IO import cats.effect.unsafe.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClient +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.{HttpClientStatusError, HttpTimeoutError} import ch.epfl.bluebrain.nexus.delta.kernel.{Logger, RdfMediaTypes} import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.model.CompositeViewSource.RemoteProjectSource import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.stream.CompositeBranch import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri import ch.epfl.bluebrain.nexus.delta.rdf.graph.NQuads import ch.epfl.bluebrain.nexus.delta.sdk.auth.{AuthTokenProvider, Credentials} -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClient -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.HttpClientStatusError import ch.epfl.bluebrain.nexus.delta.sdk.projects.model.ProjectStatistics import ch.epfl.bluebrain.nexus.delta.sdk.stream.StreamConverter import ch.epfl.bluebrain.nexus.delta.sdk.syntax._ @@ -25,7 +25,6 @@ import ch.epfl.bluebrain.nexus.delta.sourcing.offset.Offset import ch.epfl.bluebrain.nexus.delta.sourcing.offset.Offset.Start import ch.epfl.bluebrain.nexus.delta.sourcing.stream.{Elem, RemainingElems} import io.circe.parser.decode -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.HttpTimeoutError import fs2._ import scala.concurrent.Future diff --git a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/model/CompositeViewRejection.scala b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/model/CompositeViewRejection.scala index 671a310846..b04ee20ce5 100644 --- a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/model/CompositeViewRejection.scala +++ b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/model/CompositeViewRejection.scala @@ -2,6 +2,7 @@ package ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.model import akka.http.scaladsl.model.StatusCodes import ch.epfl.bluebrain.nexus.delta.kernel.error.Rejection +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.kernel.utils.ClassUtils import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.SparqlClientError import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.model.CompositeViewSource._ @@ -10,7 +11,6 @@ import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.ContextValue import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.JsonLdContext.keywords import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sdk.implicits._ import ch.epfl.bluebrain.nexus.delta.sdk.jsonld.JsonLdRejection import ch.epfl.bluebrain.nexus.delta.sdk.marshalling.HttpResponseFields diff --git a/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/ElasticSearchQuerySpec.scala b/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/ElasticSearchQuerySpec.scala index ef99a6741d..e1852f2b40 100644 --- a/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/ElasticSearchQuerySpec.scala +++ b/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/ElasticSearchQuerySpec.scala @@ -4,6 +4,7 @@ import akka.http.scaladsl.model.HttpRequest import akka.http.scaladsl.model.Uri.Query import cats.data.NonEmptyList import cats.effect.IO +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.HttpUnexpectedError import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.model.permissions import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.indexing.CompositeViewDef.ActiveViewDef import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.indexing.projectionIndex @@ -20,7 +21,6 @@ import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclSimpleCheck import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddress import ch.epfl.bluebrain.nexus.delta.sdk.error.ServiceError.AuthorizationFailed import ch.epfl.bluebrain.nexus.delta.sdk.generators.ProjectGen -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.HttpUnexpectedError import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller import ch.epfl.bluebrain.nexus.delta.sdk.implicits._ import ch.epfl.bluebrain.nexus.delta.sdk.model._ diff --git a/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClientSpec.scala b/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClientSpec.scala index bc1b8b2aee..4a3184f07f 100644 --- a/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClientSpec.scala +++ b/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClientSpec.scala @@ -11,12 +11,12 @@ import akka.http.scaladsl.server.RouteResult import akka.stream.scaladsl.Source import akka.testkit.TestKit import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientConfig, HttpClientError} import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.model.CompositeViewSource.RemoteProjectSource import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.stream.CompositeBranch import ch.epfl.bluebrain.nexus.delta.rdf.graph.NQuads import ch.epfl.bluebrain.nexus.delta.sdk.ConfigFixtures import ch.epfl.bluebrain.nexus.delta.sdk.auth.{AuthTokenProvider, Credentials} -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientConfig, HttpClientError} import ch.epfl.bluebrain.nexus.delta.sdk.marshalling.QueryParamsUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.projects.model.ProjectStatistics import ch.epfl.bluebrain.nexus.delta.sdk.syntax._ diff --git a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ElasticSearchPluginModule.scala b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ElasticSearchPluginModule.scala index 44ee44fb6e..42db3ee713 100644 --- a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ElasticSearchPluginModule.scala +++ b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ElasticSearchPluginModule.scala @@ -23,7 +23,7 @@ import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck import ch.epfl.bluebrain.nexus.delta.sdk.deletion.ProjectDeletionTask import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaSchemeDirectives import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientConfig} +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientConfig} import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.ServiceAccount import ch.epfl.bluebrain.nexus.delta.sdk.model._ diff --git a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ElasticSearchViewsQuery.scala b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ElasticSearchViewsQuery.scala index 472a024ff2..789a63e953 100644 --- a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ElasticSearchViewsQuery.scala +++ b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ElasticSearchViewsQuery.scala @@ -11,7 +11,7 @@ import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddress.{Project => ProjectAcl} import ch.epfl.bluebrain.nexus.delta.sdk.error.ServiceError.AuthorizationFailed -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller import ch.epfl.bluebrain.nexus.delta.sdk.model.IdSegment import ch.epfl.bluebrain.nexus.delta.sdk.model.search.SortList diff --git a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ValidateElasticSearchView.scala b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ValidateElasticSearchView.scala index b2a8a5a17e..fb36b7def3 100644 --- a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ValidateElasticSearchView.scala +++ b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ValidateElasticSearchView.scala @@ -6,8 +6,8 @@ import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.{ElasticSearch import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.ElasticSearchViewRejection.{InvalidElasticSearchIndexPayload, InvalidPipeline, InvalidViewReferences, PermissionIsNotDefined, TooManyViewReferences, WrappedElasticSearchClientError} import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.ElasticSearchViewValue.{AggregateElasticSearchViewValue, IndexingElasticSearchViewValue} import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.{DefaultMapping, DefaultSettings, ElasticSearchViewValue} -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.HttpClientStatusError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.HttpClientStatusError import ch.epfl.bluebrain.nexus.delta.sdk.permissions.Permissions import ch.epfl.bluebrain.nexus.delta.sdk.permissions.model.Permission import ch.epfl.bluebrain.nexus.delta.sdk.views.{IndexingRev, ValidateAggregate} diff --git a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/ElasticSearchClient.scala b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/ElasticSearchClient.scala index 4c386e8faa..5ab70669b6 100644 --- a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/ElasticSearchClient.scala +++ b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/ElasticSearchClient.scala @@ -9,17 +9,17 @@ import akka.http.scaladsl.model.headers.BasicHttpCredentials import cats.effect.IO import cats.syntax.all._ import ch.epfl.bluebrain.nexus.delta.kernel.RetryStrategy.logError +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceMarshalling._ import ch.epfl.bluebrain.nexus.delta.kernel.dependency.ComponentDescription.ServiceDescription import ch.epfl.bluebrain.nexus.delta.kernel.dependency.ComponentDescription.ServiceDescription.ResolvedServiceDescription +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.{HttpClientStatusError, HttpUnexpectedError} +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientError} import ch.epfl.bluebrain.nexus.delta.kernel.search.Pagination import ch.epfl.bluebrain.nexus.delta.kernel.utils.UrlUtils import ch.epfl.bluebrain.nexus.delta.kernel.{Logger, RetryStrategy} import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchClient.BulkResponse.MixedOutcomes.Outcome import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchClient._ import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.{EmptyResults, ResourcesSearchParams} -import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceMarshalling._ -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.{HttpClientStatusError, HttpUnexpectedError} -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientError} import ch.epfl.bluebrain.nexus.delta.sdk.model.BaseUri import ch.epfl.bluebrain.nexus.delta.sdk.model.search.ResultEntry.{ScoredResultEntry, UnscoredResultEntry} import ch.epfl.bluebrain.nexus.delta.sdk.model.search.SearchResults.{ScoredSearchResults, UnscoredSearchResults} diff --git a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/indexing/ElasticSearchCoordinator.scala b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/indexing/ElasticSearchCoordinator.scala index 704968af16..0331212fee 100644 --- a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/indexing/ElasticSearchCoordinator.scala +++ b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/indexing/ElasticSearchCoordinator.scala @@ -11,7 +11,7 @@ import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchC import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.config.ElasticSearchViewsConfig import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.indexing.IndexingViewDef.{ActiveViewDef, DeprecatedViewDef} import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.{HttpClientStatusError, HttpServerStatusError} +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.{HttpClientStatusError, HttpServerStatusError} import ch.epfl.bluebrain.nexus.delta.sdk.stream.GraphResourceStream import ch.epfl.bluebrain.nexus.delta.sdk.views.ViewRef import ch.epfl.bluebrain.nexus.delta.sourcing.model.SuccessElemStream diff --git a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/model/ElasticSearchViewRejection.scala b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/model/ElasticSearchViewRejection.scala index 2c0482d2f6..a65c893ab0 100644 --- a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/model/ElasticSearchViewRejection.scala +++ b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/model/ElasticSearchViewRejection.scala @@ -2,13 +2,13 @@ package ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model import akka.http.scaladsl.model.StatusCodes import ch.epfl.bluebrain.nexus.delta.kernel.error.Rejection +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.kernel.utils.ClassUtils import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.ContextValue import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.JsonLdContext.keywords import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sdk.jsonld.JsonLdRejection import ch.epfl.bluebrain.nexus.delta.sdk.marshalling.HttpResponseFields import ch.epfl.bluebrain.nexus.delta.sdk.model.IdSegmentRef diff --git a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/query/DefaultViewsQuery.scala b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/query/DefaultViewsQuery.scala index 3c44daa88b..cf5606a2f9 100644 --- a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/query/DefaultViewsQuery.scala +++ b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/query/DefaultViewsQuery.scala @@ -3,6 +3,7 @@ package ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.query import akka.http.scaladsl.model.Uri import cats.effect.IO import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchClient import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.config.ElasticSearchViewsConfig import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.permissions @@ -10,7 +11,6 @@ import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.query.ElasticSearchQu import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddress.{Project => ProjectAcl} import ch.epfl.bluebrain.nexus.delta.sdk.error.ServiceError.AuthorizationFailed -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller import ch.epfl.bluebrain.nexus.delta.sdk.model.BaseUri import ch.epfl.bluebrain.nexus.delta.sdk.model.search.{AggregationResult, SearchResults} diff --git a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/query/ElasticSearchQueryError.scala b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/query/ElasticSearchQueryError.scala index 3bd9f87dbe..1c883e610f 100644 --- a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/query/ElasticSearchQueryError.scala +++ b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/query/ElasticSearchQueryError.scala @@ -7,7 +7,7 @@ import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.ContextValue import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.JsonLdContext.keywords import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sdk.marshalling.HttpResponseFields import ch.epfl.bluebrain.nexus.delta.sourcing.model.ProjectRef import io.circe.syntax.KeyOps diff --git a/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ElasticSearchClientSetup.scala b/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ElasticSearchClientSetup.scala index 3e1a95e3fe..96fd55a637 100644 --- a/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ElasticSearchClientSetup.scala +++ b/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ElasticSearchClientSetup.scala @@ -4,9 +4,9 @@ import akka.actor.ActorSystem import akka.http.scaladsl.model.headers.BasicHttpCredentials import cats.effect.{IO, Resource} import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchClient -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientSetup import ch.epfl.bluebrain.nexus.testkit.CirceLiteral import ch.epfl.bluebrain.nexus.testkit.elasticsearch.ElasticSearchContainer +import ch.epfl.bluebrain.nexus.testkit.http.HttpClientSetup import munit.CatsEffectSuite import munit.catseffect.IOFixture diff --git a/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ScalaTestElasticSearchClientSetup.scala b/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ScalaTestElasticSearchClientSetup.scala index 962fc42fe6..f929c1173c 100644 --- a/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ScalaTestElasticSearchClientSetup.scala +++ b/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/ScalaTestElasticSearchClientSetup.scala @@ -5,7 +5,7 @@ import akka.http.scaladsl.model.headers.BasicHttpCredentials import cats.effect.unsafe.implicits._ import ch.epfl.bluebrain.nexus.delta.kernel.RetryStrategyConfig import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchClient -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientConfig, HttpClientWorthRetry} +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientConfig, HttpClientWorthRetry} import ch.epfl.bluebrain.nexus.testkit.CirceLiteral import ch.epfl.bluebrain.nexus.testkit.elasticsearch.{ElasticSearchContainer, ElasticSearchDocker} diff --git a/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/ElasticSearchClientSpec.scala b/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/ElasticSearchClientSpec.scala index 21fd83f4ca..071e93a939 100644 --- a/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/ElasticSearchClientSpec.scala +++ b/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/ElasticSearchClientSpec.scala @@ -12,8 +12,8 @@ import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.ScalaTestElasticSearc import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchClient.BulkResponse.MixedOutcomes.Outcome import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchClient.{BulkResponse, Refresh} import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.ResourcesSearchParams -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.HttpClientStatusError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.HttpClientStatusError import ch.epfl.bluebrain.nexus.delta.sdk.model.BaseUri import ch.epfl.bluebrain.nexus.delta.sdk.model.search.ResultEntry.ScoredResultEntry import ch.epfl.bluebrain.nexus.delta.sdk.model.search.SearchResults.ScoredSearchResults diff --git a/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/indexing/ElasticSearchSinkSuite.scala b/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/indexing/ElasticSearchSinkSuite.scala index 62ebc4ccf9..fbb34594c6 100644 --- a/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/indexing/ElasticSearchSinkSuite.scala +++ b/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/indexing/ElasticSearchSinkSuite.scala @@ -2,12 +2,12 @@ package ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.indexing import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.model.Uri.Query +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.ElasticSearchClientSetup import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchClient.Refresh import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.{IndexLabel, QueryBuilder} import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.nxv -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sourcing.model.{EntityType, ProjectRef} import ch.epfl.bluebrain.nexus.delta.sourcing.offset.Offset import ch.epfl.bluebrain.nexus.delta.sourcing.stream.Elem.{DroppedElem, FailedElem, SuccessElem} diff --git a/delta/plugins/graph-analytics/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/GraphAnalytics.scala b/delta/plugins/graph-analytics/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/GraphAnalytics.scala index b9dd97dd60..a53978c80f 100644 --- a/delta/plugins/graph-analytics/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/GraphAnalytics.scala +++ b/delta/plugins/graph-analytics/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/GraphAnalytics.scala @@ -4,6 +4,7 @@ import akka.http.scaladsl.model.Uri.Query import cats.data.NonEmptySeq import cats.effect.IO import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.{ElasticSearchClient, IndexLabel, QueryBuilder} import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.ElasticSearchViewRejection.WrappedElasticSearchClientError import ch.epfl.bluebrain.nexus.delta.plugins.graph.analytics.config.GraphAnalyticsConfig.TermAggregationsConfig @@ -12,7 +13,6 @@ import ch.epfl.bluebrain.nexus.delta.plugins.graph.analytics.model.GraphAnalytic import ch.epfl.bluebrain.nexus.delta.plugins.graph.analytics.model.PropertiesStatistics.propertiesDecoderFromEsAggregations import ch.epfl.bluebrain.nexus.delta.plugins.graph.analytics.model.{AnalyticsGraph, PropertiesStatistics} import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sdk.jsonld.ExpandIri import ch.epfl.bluebrain.nexus.delta.sdk.model.IdSegment import ch.epfl.bluebrain.nexus.delta.sdk.projects.FetchContext diff --git a/delta/plugins/graph-analytics/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/GraphAnalyticsViewsQuery.scala b/delta/plugins/graph-analytics/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/GraphAnalyticsViewsQuery.scala index baf1369168..d7f029eb9c 100644 --- a/delta/plugins/graph-analytics/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/GraphAnalyticsViewsQuery.scala +++ b/delta/plugins/graph-analytics/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/GraphAnalyticsViewsQuery.scala @@ -3,9 +3,9 @@ package ch.epfl.bluebrain.nexus.delta.plugins.graph.analytics import akka.http.scaladsl.model.Uri import cats.effect.IO import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchClient import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.ElasticSearchViewRejection.WrappedElasticSearchClientError -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sdk.model.search.SortList import ch.epfl.bluebrain.nexus.delta.sourcing.model.ProjectRef import io.circe.{Json, JsonObject} diff --git a/delta/plugins/graph-analytics/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/GraphAnalyticsSpec.scala b/delta/plugins/graph-analytics/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/GraphAnalyticsSpec.scala index b2f8eeafb1..5cc52465ca 100644 --- a/delta/plugins/graph-analytics/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/GraphAnalyticsSpec.scala +++ b/delta/plugins/graph-analytics/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/GraphAnalyticsSpec.scala @@ -3,6 +3,7 @@ package ch.epfl.bluebrain.nexus.delta.plugins.graph.analytics import akka.actor.ActorSystem import akka.testkit.TestKit import ch.epfl.bluebrain.nexus.delta.kernel.RetryStrategyConfig +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientConfig, HttpClientWorthRetry} import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.Fixtures import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.{ElasticSearchAction, ElasticSearchClient} import ch.epfl.bluebrain.nexus.delta.plugins.graph.analytics.config.GraphAnalyticsConfig.TermAggregationsConfig @@ -12,7 +13,6 @@ import ch.epfl.bluebrain.nexus.delta.plugins.graph.analytics.model.{AnalyticsGra import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.schema import ch.epfl.bluebrain.nexus.delta.sdk.ConfigFixtures import ch.epfl.bluebrain.nexus.delta.sdk.generators.ProjectGen -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientConfig, HttpClientWorthRetry} import ch.epfl.bluebrain.nexus.delta.sdk.projects.FetchContextDummy import ch.epfl.bluebrain.nexus.delta.sdk.syntax._ import ch.epfl.bluebrain.nexus.testkit.clock.FixedClock diff --git a/delta/plugins/search/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/search/Search.scala b/delta/plugins/search/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/search/Search.scala index 04dc529ada..10f177ce62 100644 --- a/delta/plugins/search/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/search/Search.scala +++ b/delta/plugins/search/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/search/Search.scala @@ -3,6 +3,7 @@ package ch.epfl.bluebrain.nexus.delta.plugins.search import akka.http.scaladsl.model.Uri import cats.effect.IO import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.kernel.search.Pagination import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.CompositeViews import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.indexing.projectionIndex @@ -13,7 +14,6 @@ import ch.epfl.bluebrain.nexus.delta.plugins.search.model.SearchRejection.{Unkno import ch.epfl.bluebrain.nexus.delta.plugins.search.model._ import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddress.{Project => ProjectAcl} -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller import ch.epfl.bluebrain.nexus.delta.sourcing.model.{Label, ProjectRef} import io.circe.{Json, JsonObject} diff --git a/delta/plugins/search/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/search/model/SearchRejection.scala b/delta/plugins/search/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/search/model/SearchRejection.scala index 11e54b1be6..47e5b3dafb 100644 --- a/delta/plugins/search/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/search/model/SearchRejection.scala +++ b/delta/plugins/search/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/search/model/SearchRejection.scala @@ -2,12 +2,12 @@ package ch.epfl.bluebrain.nexus.delta.plugins.search.model import akka.http.scaladsl.model.StatusCodes import ch.epfl.bluebrain.nexus.delta.kernel.error.Rejection +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.kernel.utils.ClassUtils import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.ContextValue import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.JsonLdContext.keywords import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sdk.marshalling.HttpResponseFields import ch.epfl.bluebrain.nexus.delta.sourcing.model.Label import io.circe.syntax._ diff --git a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/StoragePluginModule.scala b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/StoragePluginModule.scala index 16fa22b3ed..d9b6afb9aa 100644 --- a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/StoragePluginModule.scala +++ b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/StoragePluginModule.scala @@ -37,7 +37,7 @@ import ch.epfl.bluebrain.nexus.delta.sdk.auth.AuthTokenProvider import ch.epfl.bluebrain.nexus.delta.sdk.deletion.ProjectDeletionTask import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaSchemeDirectives import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClient +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClient import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.ServiceAccount import ch.epfl.bluebrain.nexus.delta.sdk.jws.JWSPayloadHelper diff --git a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/access/RemoteStorageAccess.scala b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/access/RemoteStorageAccess.scala index 68152f2ec3..63e9f91243 100644 --- a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/access/RemoteStorageAccess.scala +++ b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/access/RemoteStorageAccess.scala @@ -4,7 +4,7 @@ import cats.syntax.all._ import cats.effect.IO import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageRejection.StorageNotAccessible import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.operations.remote.client.RemoteDiskStorageClient -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sourcing.model.Label trait RemoteStorageAccess { diff --git a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/remote/client/RemoteDiskStorageClient.scala b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/remote/client/RemoteDiskStorageClient.scala index 05458fcbda..456e38b5cc 100644 --- a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/remote/client/RemoteDiskStorageClient.scala +++ b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/remote/client/RemoteDiskStorageClient.scala @@ -21,8 +21,8 @@ import ch.epfl.bluebrain.nexus.delta.kernel.AkkaSource import ch.epfl.bluebrain.nexus.delta.sdk.auth.{AuthTokenProvider, Credentials} import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceMarshalling._ import ch.epfl.bluebrain.nexus.delta.sdk.error.ServiceError.FeatureDisabled -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError._ -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientError} +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError._ +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientError} import ch.epfl.bluebrain.nexus.delta.sdk.model.BaseUri import ch.epfl.bluebrain.nexus.delta.sdk.syntax._ import ch.epfl.bluebrain.nexus.delta.sourcing.model.Label diff --git a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/remotestorage/RemoteStorageClientFixtures.scala b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/remotestorage/RemoteStorageClientFixtures.scala index 3fad5a51db..8d46940182 100644 --- a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/remotestorage/RemoteStorageClientFixtures.scala +++ b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/remotestorage/RemoteStorageClientFixtures.scala @@ -1,12 +1,12 @@ package ch.epfl.bluebrain.nexus.delta.plugins.storage.remotestorage import akka.actor.ActorSystem +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientConfig} import ch.epfl.bluebrain.nexus.delta.plugins.storage.remotestorage.RemoteStorageClientFixtures.{BucketName, RemoteStorageHostConfig} import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.operations.remote.client.RemoteDiskStorageClient import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.operations.remote.client.RemoteDiskStorageClient.RemoteDiskStorageClientImpl import ch.epfl.bluebrain.nexus.delta.sdk.ConfigFixtures import ch.epfl.bluebrain.nexus.delta.sdk.auth.{AuthTokenProvider, Credentials} -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientConfig} import ch.epfl.bluebrain.nexus.delta.sdk.model.BaseUri import ch.epfl.bluebrain.nexus.testkit.scalatest.BaseSpec import org.scalatest.BeforeAndAfterAll diff --git a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/StorageDeletionTaskSuite.scala b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/StorageDeletionTaskSuite.scala index d7c92827fc..e352e1d84a 100644 --- a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/StorageDeletionTaskSuite.scala +++ b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/StorageDeletionTaskSuite.scala @@ -8,9 +8,9 @@ import ch.epfl.bluebrain.nexus.delta.plugins.storage.files.model.FileStorageMeta import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.{DigestAlgorithm, StorageValue} import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.operations.UploadingFile.DiskUploadingFile import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.operations.disk.DiskFileOperations -import ch.epfl.bluebrain.nexus.delta.sdk.actor.ActorSystemSetup import ch.epfl.bluebrain.nexus.delta.sourcing.model.Identity.{Anonymous, Subject} import ch.epfl.bluebrain.nexus.delta.sourcing.model.ProjectRef +import ch.epfl.bluebrain.nexus.testkit.actor.ActorSystemSetup import ch.epfl.bluebrain.nexus.testkit.mu.NexusSuite import fs2.Stream import munit.AnyFixture diff --git a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/remote/client/RemoteStorageClientSpec.scala b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/remote/client/RemoteStorageClientSpec.scala index c76a9412ce..738120cd74 100644 --- a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/remote/client/RemoteStorageClientSpec.scala +++ b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/remote/client/RemoteStorageClientSpec.scala @@ -12,7 +12,7 @@ import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.DigestAlgori import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.operations.AkkaSourceHelpers import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.operations.StorageFileRejection.{FetchFileRejection, MoveFileRejection} import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.operations.remote.client.model.RemoteDiskStorageFileAttributes -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.HttpClientStatusError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.HttpClientStatusError import ch.epfl.bluebrain.nexus.delta.sourcing.model.Label import ch.epfl.bluebrain.nexus.testkit.scalatest.ce.CatsEffectSpec import org.scalatest.concurrent.Eventually diff --git a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/s3/S3FileOperationsSuite.scala b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/s3/S3FileOperationsSuite.scala index aeb20ace00..7c56f74bac 100644 --- a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/s3/S3FileOperationsSuite.scala +++ b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/s3/S3FileOperationsSuite.scala @@ -16,8 +16,8 @@ import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.operations.Uploadi import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.operations.s3.client.S3StorageClient import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.{StorageFixtures, UUIDFFixtures} import ch.epfl.bluebrain.nexus.delta.rdf.syntax.uriSyntax -import ch.epfl.bluebrain.nexus.delta.sdk.actor.ActorSystemSetup import ch.epfl.bluebrain.nexus.delta.sourcing.model.ProjectRef +import ch.epfl.bluebrain.nexus.testkit.actor.ActorSystemSetup import ch.epfl.bluebrain.nexus.testkit.mu.NexusSuite import io.laserdisc.pure.s3.tagless.S3AsyncClientOp import munit.AnyFixture diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/auth/OpenIdAuthService.scala b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/auth/OpenIdAuthService.scala index be6f206b0d..778e50e77c 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/auth/OpenIdAuthService.scala +++ b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/auth/OpenIdAuthService.scala @@ -10,7 +10,7 @@ import ch.epfl.bluebrain.nexus.delta.kernel.Secret import ch.epfl.bluebrain.nexus.delta.kernel.jwt.{AuthToken, ParsedToken} import ch.epfl.bluebrain.nexus.delta.sdk.auth.Credentials.ClientCredentials import ch.epfl.bluebrain.nexus.delta.sdk.error.AuthTokenError.{AuthTokenHttpError, AuthTokenNotFoundInResponse, RealmIsDeprecated} -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientError} +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientError} import ch.epfl.bluebrain.nexus.delta.sdk.realms.Realms import ch.epfl.bluebrain.nexus.delta.sdk.realms.model.Realm import ch.epfl.bluebrain.nexus.delta.sourcing.model.Label diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/error/AuthTokenError.scala b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/error/AuthTokenError.scala index 6ef19a4c2e..a403b0b7e9 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/error/AuthTokenError.scala +++ b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/error/AuthTokenError.scala @@ -4,7 +4,7 @@ import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.contexts import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.ContextValue import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.JsonLdContext.keywords import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError import ch.epfl.bluebrain.nexus.delta.sdk.realms.model.Realm import io.circe.syntax.{EncoderOps, KeyOps} import io.circe.{DecodingFailure, Encoder, JsonObject} diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/identities/IdentitiesImpl.scala b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/identities/IdentitiesImpl.scala index 14db4988ff..f528050b42 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/identities/IdentitiesImpl.scala +++ b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/identities/IdentitiesImpl.scala @@ -11,8 +11,8 @@ import ch.epfl.bluebrain.nexus.delta.kernel.jwt.TokenRejection.{GetGroupsFromOid import ch.epfl.bluebrain.nexus.delta.kernel.jwt.{AuthToken, ParsedToken} import ch.epfl.bluebrain.nexus.delta.kernel.kamon.KamonMetricComponent import ch.epfl.bluebrain.nexus.delta.kernel.search.Pagination.FromPagination -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClient -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.HttpClientStatusError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClient +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.HttpClientStatusError import ch.epfl.bluebrain.nexus.delta.sdk.identities.IdentitiesImpl.{extractGroups, logger, GroupsCache, RealmCache} import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller import ch.epfl.bluebrain.nexus.delta.sdk.model.ResourceF diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/ConfigFixtures.scala b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/ConfigFixtures.scala index ad20186094..a45d7b5856 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/ConfigFixtures.scala +++ b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/ConfigFixtures.scala @@ -5,7 +5,7 @@ import ch.epfl.bluebrain.nexus.delta.kernel.RetryStrategyConfig import ch.epfl.bluebrain.nexus.delta.kernel.cache.CacheConfig import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclsConfig import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig -import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClientConfig, HttpClientWorthRetry} +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClientConfig, HttpClientWorthRetry} import ch.epfl.bluebrain.nexus.delta.sdk.model.search.PaginationConfig import ch.epfl.bluebrain.nexus.delta.sdk.projects.ProjectsConfig import ch.epfl.bluebrain.nexus.delta.sourcing.config.{EventLogConfig, QueryConfig} diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/identities/IdentitiesImplSuite.scala b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/identities/IdentitiesImplSuite.scala index 045d1a3411..605b436281 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/identities/IdentitiesImplSuite.scala +++ b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/identities/IdentitiesImplSuite.scala @@ -5,10 +5,10 @@ import akka.http.scaladsl.model.{HttpRequest, Uri} import cats.data.NonEmptySet import cats.effect.{IO, Ref} import ch.epfl.bluebrain.nexus.delta.kernel.cache.LocalCache +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.HttpUnexpectedError import ch.epfl.bluebrain.nexus.delta.kernel.jwt.TokenRejection._ import ch.epfl.bluebrain.nexus.delta.kernel.jwt.{AuthToken, ParsedToken} import ch.epfl.bluebrain.nexus.delta.sdk.generators.{RealmGen, WellKnownGen} -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.HttpUnexpectedError import ch.epfl.bluebrain.nexus.delta.sdk.identities.IdentitiesImpl.{GroupsCache, RealmCache} import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller import ch.epfl.bluebrain.nexus.delta.sdk.realms.model.Realm diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/realms/WellKnownResolverSuite.scala b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/realms/WellKnownResolverSuite.scala index 79a31f3799..bad494e8cd 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/realms/WellKnownResolverSuite.scala +++ b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/realms/WellKnownResolverSuite.scala @@ -2,7 +2,7 @@ package ch.epfl.bluebrain.nexus.delta.sdk.realms import akka.http.scaladsl.model.{HttpRequest, Uri} import cats.effect.IO -import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.HttpUnexpectedError +import ch.epfl.bluebrain.nexus.delta.kernel.http.HttpClientError.HttpUnexpectedError import ch.epfl.bluebrain.nexus.delta.sdk.realms.model.GrantType import ch.epfl.bluebrain.nexus.delta.sdk.realms.model.GrantType._ import ch.epfl.bluebrain.nexus.delta.sdk.realms.model.RealmRejection.{IllegalEndpointFormat, IllegalIssuerFormat, IllegalJwkFormat, IllegalJwksUriFormat, NoValidKeysFound, UnsuccessfulJwksResponse, UnsuccessfulOpenIdConfigResponse} diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/actor/ActorSystemSetup.scala b/delta/testkit/src/main/scala/ch/epfl/bluebrain/nexus/testkit/actor/ActorSystemSetup.scala similarity index 89% rename from delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/actor/ActorSystemSetup.scala rename to delta/testkit/src/main/scala/ch/epfl/bluebrain/nexus/testkit/actor/ActorSystemSetup.scala index bc091e0585..4d8d0c9d70 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/actor/ActorSystemSetup.scala +++ b/delta/testkit/src/main/scala/ch/epfl/bluebrain/nexus/testkit/actor/ActorSystemSetup.scala @@ -1,4 +1,4 @@ -package ch.epfl.bluebrain.nexus.delta.sdk.actor +package ch.epfl.bluebrain.nexus.testkit.actor import akka.actor.ActorSystem import cats.effect.{IO, Resource} diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientSetup.scala b/delta/testkit/src/main/scala/ch/epfl/bluebrain/nexus/testkit/http/HttpClientSetup.scala similarity index 69% rename from delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientSetup.scala rename to delta/testkit/src/main/scala/ch/epfl/bluebrain/nexus/testkit/http/HttpClientSetup.scala index 7adb68b4de..4a74071523 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClientSetup.scala +++ b/delta/testkit/src/main/scala/ch/epfl/bluebrain/nexus/testkit/http/HttpClientSetup.scala @@ -1,9 +1,10 @@ -package ch.epfl.bluebrain.nexus.delta.sdk.http +package ch.epfl.bluebrain.nexus.testkit.http import akka.actor.ActorSystem import cats.effect.{IO, Resource} import ch.epfl.bluebrain.nexus.delta.kernel.RetryStrategyConfig -import ch.epfl.bluebrain.nexus.delta.sdk.actor.ActorSystemSetup +import ch.epfl.bluebrain.nexus.delta.kernel.http.{HttpClient, HttpClientConfig, HttpClientWorthRetry} +import ch.epfl.bluebrain.nexus.testkit.actor.ActorSystemSetup object HttpClientSetup {