From ff3a3a10347020dac24796fa82e9aab60011f78a Mon Sep 17 00:00:00 2001 From: Raitis Veinbahs Date: Tue, 13 Feb 2024 12:39:37 +0100 Subject: [PATCH] chore: Add -Xfatal-warnings --- build.sbt | 3 ++- .../src/test/scala/org/knora/sipi/SipiIT.scala | 3 ++- .../src/test/scala/org/knora/webapi/E2ESpec.scala | 15 --------------- .../src/test/scala/org/knora/webapi/R2RSpec.scala | 4 ++-- .../scala/org/knora/webapi/core/LayersTest.scala | 3 ++- .../org/knora/webapi/e2e/CORSSupportE2ESpec.scala | 3 +-- .../webapi/e2e/ClientTestDataCollector.scala | 1 + .../org/knora/webapi/e2e/HealthRouteE2ESpec.scala | 4 +--- .../knora/webapi/e2e/InstanceCheckerSpec.scala | 3 +-- .../knora/webapi/e2e/admin/GroupsADME2ESpec.scala | 3 +-- .../lists/CreateListItemsRouteADME2ESpec.scala | 3 +-- .../lists/DeleteListItemsRouteADME2ESpec.scala | 3 +-- .../admin/lists/GetListItemsRouteADME2ESpec.scala | 3 +-- .../lists/UpdateListItemsRouteADME2ESpec.scala | 3 +-- .../webapi/e2e/http/ServerVersionE2ESpec.scala | 3 +-- .../webapi/e2e/v2/AuthenticationV2E2ESpec.scala | 9 +++------ .../knora/webapi/e2e/v2/OntologyV2R2RSpec.scala | 1 + .../webapi/e2e/v2/ValuesRouteV2E2ESpec.scala | 5 +++-- .../usersmessages/UsersMessagesADMSpec.scala | 3 --- .../messages/util/CalendarDateUtilV2Spec.scala | 6 ++++-- .../messages/util/rdf/RdfFormatUtilSpec.scala | 5 +++-- .../webapi/messages/util/rdf/RdfModelSpec.scala | 8 ++++---- .../responders/v2/ListsResponderV2Spec.scala | 5 +---- .../v2/ListsResponderV2SpecFullData.scala | 3 +-- .../responders/v2/OntologyResponderV2Spec.scala | 7 +++---- .../responders/v2/ResourcesResponderV2Spec.scala | 3 ++- .../responders/v2/ValuesResponderV2Spec.scala | 10 ++++++---- .../upgrade/plugins/UpgradePluginPR1746Spec.scala | 3 ++- .../upgrade/plugins/UpgradePluginPR1921Spec.scala | 3 ++- .../scala/org/knora/webapi/config/AppConfig.scala | 4 ++-- .../webapi/messages/util/PermissionUtilADM.scala | 1 - .../responders/v2/ResourcesResponderV2.scala | 2 -- .../webapi/responders/v2/ValuesResponderV2.scala | 1 - .../webapi/slice/admin/api/UsersEndpoints.scala | 1 - .../slice/infrastructure/MetricsServer.scala | 4 ++-- .../slice/common/repo/rdf/RdfModelSpec.scala | 6 +++--- 36 files changed, 60 insertions(+), 87 deletions(-) diff --git a/build.sbt b/build.sbt index ec02996ca1b..79cefac4213 100644 --- a/build.sbt +++ b/build.sbt @@ -157,7 +157,8 @@ val customScalacOptions = Seq( "-Wvalue-discard", "-Xlint:doc-detached", // silence twirl templates unused imports warnings - "-Wconf:src=target/.*:s" + "-Wconf:src=target/.*:s", + "-Xfatal-warnings" ) lazy val webapi: Project = Project(id = "webapi", base = file("webapi")) diff --git a/integration/src/test/scala/org/knora/sipi/SipiIT.scala b/integration/src/test/scala/org/knora/sipi/SipiIT.scala index d7188ffe802..1242b7e2602 100644 --- a/integration/src/test/scala/org/knora/sipi/SipiIT.scala +++ b/integration/src/test/scala/org/knora/sipi/SipiIT.scala @@ -342,7 +342,7 @@ object MockDspApiServer { ) ) .logError - .fold(err => false, succ => true) + .fold(_ => false, _ => true) } private def stubGetJsonResponse( @@ -355,6 +355,7 @@ object MockDspApiServer { val jsonResponse = aResponse().withStatus(status).withBody(json).withHeader("Content-Type", "application/json") val stubBuilder = get(urlEqualTo(url)).willReturn(jsonResponse) server.stubFor(stubBuilder) + () } private def acquireWireMockServer: Task[WireMockServer] = ZIO.attempt { diff --git a/integration/src/test/scala/org/knora/webapi/E2ESpec.scala b/integration/src/test/scala/org/knora/webapi/E2ESpec.scala index 6392eb0e0fc..d220049e503 100644 --- a/integration/src/test/scala/org/knora/webapi/E2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/E2ESpec.scala @@ -23,7 +23,6 @@ import scala.concurrent.ExecutionContext import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration -import dsp.errors.FileWriteException import org.knora.webapi.config.AppConfig import org.knora.webapi.core.AppRouter import org.knora.webapi.core.AppServer @@ -207,18 +206,4 @@ abstract class E2ESpec ) responseAsString } - - private def createTmpFileDir(): Unit = { - // check if tmp datadir exists and create it if not - val tmpFileDir = Path.of(appConfig.tmpDatadir) - - if (!Files.exists(tmpFileDir)) { - try { - Files.createDirectories(tmpFileDir) - } catch { - case e: Throwable => - throw FileWriteException(s"Tmp data directory ${appConfig.tmpDatadir} could not be created: ${e.getMessage}") - } - } - } } diff --git a/integration/src/test/scala/org/knora/webapi/R2RSpec.scala b/integration/src/test/scala/org/knora/webapi/R2RSpec.scala index 81f0c088099..49d94eae5fc 100644 --- a/integration/src/test/scala/org/knora/webapi/R2RSpec.scala +++ b/integration/src/test/scala/org/knora/webapi/R2RSpec.scala @@ -7,7 +7,6 @@ package org.knora.webapi import com.typesafe.scalalogging.Logger import org.apache.pekko.actor.ActorRef -import org.apache.pekko.actor.ActorSystem import org.apache.pekko.http.scaladsl.model.HttpResponse import org.apache.pekko.http.scaladsl.testkit.RouteTestTimeout import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest @@ -67,7 +66,7 @@ abstract class R2RSpec implicit val runtime: Runtime.Scoped[Environment] = Unsafe.unsafe(implicit u => Runtime.unsafe.fromLayer(bootstrap)) // the default timeout for route tests - implicit def default(implicit system: ActorSystem): RouteTestTimeout = RouteTestTimeout( + implicit def default: RouteTestTimeout = RouteTestTimeout( FiniteDuration(appConfig.defaultTimeout.toNanos, NANOSECONDS) ) @@ -99,6 +98,7 @@ abstract class R2RSpec runtime.unsafe.shutdown() } system.terminate() + () } protected def responseToJsonLDDocument(httpResponse: HttpResponse): JsonLDDocument = { diff --git a/integration/src/test/scala/org/knora/webapi/core/LayersTest.scala b/integration/src/test/scala/org/knora/webapi/core/LayersTest.scala index c0203ffde95..4b96e929d60 100644 --- a/integration/src/test/scala/org/knora/webapi/core/LayersTest.scala +++ b/integration/src/test/scala/org/knora/webapi/core/LayersTest.scala @@ -8,6 +8,7 @@ package org.knora.webapi.core import org.apache.pekko import zio.* +import org.knora.webapi.config.AppConfig.AppConfigurationsTest import org.knora.webapi.config.AppConfig.AppConfigurations import org.knora.webapi.config.AppConfigForTestContainers import org.knora.webapi.messages.StringFormatter @@ -81,7 +82,7 @@ object LayersTest { with DspIngestTestContainer with SharedVolumes.Images - type CommonR0 = ActorSystem with AppConfigurations with JwtService with SipiService with StringFormatter + type CommonR0 = ActorSystem with AppConfigurationsTest with JwtService with SipiService with StringFormatter type CommonR = ApiRoutes with ApiV2Endpoints diff --git a/integration/src/test/scala/org/knora/webapi/e2e/CORSSupportE2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/CORSSupportE2ESpec.scala index 66ccf0abfd6..456a54c8b23 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/CORSSupportE2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/CORSSupportE2ESpec.scala @@ -13,7 +13,6 @@ import scala.concurrent.duration.NANOSECONDS import org.knora.webapi.E2ESpec import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject -import pekko.actor.ActorSystem import pekko.http.scaladsl.model.HttpMethods.* import pekko.http.scaladsl.model.HttpResponse import pekko.http.scaladsl.model.StatusCodes @@ -25,7 +24,7 @@ import pekko.http.scaladsl.testkit.RouteTestTimeout */ class CORSSupportE2ESpec extends E2ESpec { - implicit def default(implicit system: ActorSystem): RouteTestTimeout = RouteTestTimeout( + implicit def default: RouteTestTimeout = RouteTestTimeout( FiniteDuration(appConfig.defaultTimeout.toNanos, NANOSECONDS) ) diff --git a/integration/src/test/scala/org/knora/webapi/e2e/ClientTestDataCollector.scala b/integration/src/test/scala/org/knora/webapi/e2e/ClientTestDataCollector.scala index 54d8fa96c91..265ff548e58 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/ClientTestDataCollector.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/ClientTestDataCollector.scala @@ -48,6 +48,7 @@ class ClientTestDataCollector(appConfig: AppConfig) extends LazyLogging { Files.createDirectories(fullPath.getParent()) Files.createFile(fullPath) Files.write(fullPath, s.getBytes(StandardCharsets.UTF_8)) + () } } diff --git a/integration/src/test/scala/org/knora/webapi/e2e/HealthRouteE2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/HealthRouteE2ESpec.scala index b1d3a703957..684cebf446f 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/HealthRouteE2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/HealthRouteE2ESpec.scala @@ -16,7 +16,6 @@ import org.knora.webapi.E2ESpec import org.knora.webapi.core.State import org.knora.webapi.core.domain.AppState -import pekko.actor.ActorSystem import pekko.http.scaladsl.model.* import pekko.http.scaladsl.testkit.RouteTestTimeout @@ -24,8 +23,7 @@ import pekko.http.scaladsl.testkit.RouteTestTimeout * End-to-End (E2E) test specification for testing route rejections. */ class HealthRouteE2ESpec extends E2ESpec { - - implicit def default(implicit system: ActorSystem): RouteTestTimeout = RouteTestTimeout( + implicit def default: RouteTestTimeout = RouteTestTimeout( FiniteDuration(appConfig.defaultTimeout.toNanos, NANOSECONDS) ) diff --git a/integration/src/test/scala/org/knora/webapi/e2e/InstanceCheckerSpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/InstanceCheckerSpec.scala index 3444aa7373f..64550725eb0 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/InstanceCheckerSpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/InstanceCheckerSpec.scala @@ -17,7 +17,6 @@ import org.knora.webapi.messages.IriConversions.* import org.knora.webapi.messages.StringFormatter import org.knora.webapi.util.FileUtil -import pekko.actor.ActorSystem import pekko.http.scaladsl.testkit.RouteTestTimeout /** @@ -26,7 +25,7 @@ import pekko.http.scaladsl.testkit.RouteTestTimeout class InstanceCheckerSpec extends E2ESpec { private implicit val stringFormatter: StringFormatter = StringFormatter.getGeneralInstance - implicit def default(implicit system: ActorSystem): RouteTestTimeout = RouteTestTimeout( + implicit def default: RouteTestTimeout = RouteTestTimeout( FiniteDuration(appConfig.defaultTimeout.toNanos, NANOSECONDS) ) diff --git a/integration/src/test/scala/org/knora/webapi/e2e/admin/GroupsADME2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/admin/GroupsADME2ESpec.scala index 60db5ba4274..127c2663533 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/admin/GroupsADME2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/admin/GroupsADME2ESpec.scala @@ -21,7 +21,6 @@ import org.knora.webapi.sharedtestdata.SharedTestDataADM import org.knora.webapi.util.AkkaHttpUtils import org.knora.webapi.util.MutableTestIri -import pekko.actor.ActorSystem import pekko.http.scaladsl.model.* import pekko.http.scaladsl.model.headers.* import pekko.http.scaladsl.testkit.RouteTestTimeout @@ -32,7 +31,7 @@ import pekko.http.scaladsl.unmarshalling.Unmarshal */ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { - implicit def default(implicit system: ActorSystem): RouteTestTimeout = RouteTestTimeout(30.seconds) + implicit def default: RouteTestTimeout = RouteTestTimeout(30.seconds) // Directory path for generated client test data private val clientTestDataPath: Seq[String] = Seq("admin", "groups") diff --git a/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/CreateListItemsRouteADME2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/CreateListItemsRouteADME2ESpec.scala index 0238c3870a0..8e554611fa1 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/CreateListItemsRouteADME2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/CreateListItemsRouteADME2ESpec.scala @@ -23,7 +23,6 @@ import org.knora.webapi.sharedtestdata.SharedTestDataADM import org.knora.webapi.util.AkkaHttpUtils import org.knora.webapi.util.MutableTestIri -import pekko.actor.ActorSystem import pekko.http.scaladsl.model.* import pekko.http.scaladsl.testkit.RouteTestTimeout import pekko.http.scaladsl.unmarshalling.Unmarshal @@ -33,7 +32,7 @@ import pekko.http.scaladsl.unmarshalling.Unmarshal */ class CreateListItemsRouteADME2ESpec extends E2ESpec with TriplestoreJsonProtocol with ListADMJsonProtocol { - implicit def default(implicit system: ActorSystem): RouteTestTimeout = RouteTestTimeout(5.seconds) + implicit def default: RouteTestTimeout = RouteTestTimeout(5.seconds) // Directory path for generated client test data private val clientTestDataPath: Seq[String] = Seq("admin", "lists") diff --git a/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/DeleteListItemsRouteADME2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/DeleteListItemsRouteADME2ESpec.scala index e9f2c472f11..97e9cce65b1 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/DeleteListItemsRouteADME2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/DeleteListItemsRouteADME2ESpec.scala @@ -20,7 +20,6 @@ import org.knora.webapi.sharedtestdata.SharedListsTestDataADM import org.knora.webapi.sharedtestdata.SharedTestDataADM import org.knora.webapi.util.AkkaHttpUtils -import pekko.actor.ActorSystem import pekko.http.scaladsl.model.HttpResponse import pekko.http.scaladsl.model.StatusCodes import pekko.http.scaladsl.model.headers.BasicHttpCredentials @@ -31,7 +30,7 @@ import pekko.http.scaladsl.testkit.RouteTestTimeout */ class DeleteListItemsRouteADME2ESpec extends E2ESpec with TriplestoreJsonProtocol with ListADMJsonProtocol { - implicit def default(implicit system: ActorSystem): RouteTestTimeout = RouteTestTimeout(5.seconds) + implicit def default: RouteTestTimeout = RouteTestTimeout(5.seconds) // Directory path for generated client test data private val clientTestDataPath: Seq[String] = Seq("admin", "lists") diff --git a/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/GetListItemsRouteADME2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/GetListItemsRouteADME2ESpec.scala index b9596f179ab..ed9abf2f75f 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/GetListItemsRouteADME2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/GetListItemsRouteADME2ESpec.scala @@ -20,7 +20,6 @@ import org.knora.webapi.sharedtestdata.SharedListsTestDataADM import org.knora.webapi.sharedtestdata.SharedTestDataADM import org.knora.webapi.util.AkkaHttpUtils -import pekko.actor.ActorSystem import pekko.http.scaladsl.model.* import pekko.http.scaladsl.model.headers.* import pekko.http.scaladsl.testkit.RouteTestTimeout @@ -30,7 +29,7 @@ import pekko.http.scaladsl.testkit.RouteTestTimeout */ class GetListItemsRouteADME2ESpec extends E2ESpec with TriplestoreJsonProtocol with ListADMJsonProtocol { - implicit def default(implicit system: ActorSystem): RouteTestTimeout = RouteTestTimeout(5.seconds) + implicit def default: RouteTestTimeout = RouteTestTimeout(5.seconds) // Directory path for generated client test data private val clientTestDataPath: Seq[String] = Seq("admin", "lists") diff --git a/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/UpdateListItemsRouteADME2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/UpdateListItemsRouteADME2ESpec.scala index f0de54555f6..d04a04a9426 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/UpdateListItemsRouteADME2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/admin/lists/UpdateListItemsRouteADME2ESpec.scala @@ -21,7 +21,6 @@ import org.knora.webapi.sharedtestdata.SharedListsTestDataADM import org.knora.webapi.sharedtestdata.SharedTestDataADM import org.knora.webapi.util.AkkaHttpUtils -import pekko.actor.ActorSystem import pekko.http.scaladsl.model.ContentTypes import pekko.http.scaladsl.model.HttpEntity import pekko.http.scaladsl.model.HttpResponse @@ -33,7 +32,7 @@ import pekko.http.scaladsl.testkit.RouteTestTimeout */ class UpdateListItemsRouteADME2ESpec extends E2ESpec with TriplestoreJsonProtocol with ListADMJsonProtocol { - implicit def default(implicit system: ActorSystem): RouteTestTimeout = RouteTestTimeout(5.seconds) + implicit def default: RouteTestTimeout = RouteTestTimeout(5.seconds) // Directory path for generated client test data private val clientTestDataPath: Seq[String] = Seq("admin", "lists") diff --git a/integration/src/test/scala/org/knora/webapi/e2e/http/ServerVersionE2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/http/ServerVersionE2ESpec.scala index 2e80ab19615..995b8ac91ed 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/http/ServerVersionE2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/http/ServerVersionE2ESpec.scala @@ -13,7 +13,6 @@ import scala.concurrent.duration.NANOSECONDS import org.knora.webapi.E2ESpec import org.knora.webapi.http.version.ServerVersion -import pekko.actor.ActorSystem import pekko.http.scaladsl.model.* import pekko.http.scaladsl.testkit.RouteTestTimeout @@ -21,7 +20,7 @@ import pekko.http.scaladsl.testkit.RouteTestTimeout * End-to-End (E2E) test specification for testing the server response. */ class ServerVersionE2ESpec extends E2ESpec { - implicit def default(implicit system: ActorSystem): RouteTestTimeout = RouteTestTimeout( + implicit def default: RouteTestTimeout = RouteTestTimeout( FiniteDuration(appConfig.defaultTimeout.toNanos, NANOSECONDS) ) diff --git a/integration/src/test/scala/org/knora/webapi/e2e/v2/AuthenticationV2E2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/v2/AuthenticationV2E2ESpec.scala index e4c0736a281..8e4e4b9eea3 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/v2/AuthenticationV2E2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/v2/AuthenticationV2E2ESpec.scala @@ -104,8 +104,7 @@ class AuthenticationV2E2ESpec extends E2ESpec with AuthenticationV2JsonProtocol } "The Authentication Route ('v2/authentication')" should { - - var token = new MutableTestString + val token = new MutableTestString "login with IRI" in { @@ -279,8 +278,7 @@ class AuthenticationV2E2ESpec extends E2ESpec with AuthenticationV2JsonProtocol } "The Users V1 Route using the Authenticator trait " ignore { - - var token = new MutableTestString + val token = new MutableTestString "login in v2" in { /* Correct username and correct password */ @@ -348,8 +346,7 @@ class AuthenticationV2E2ESpec extends E2ESpec with AuthenticationV2JsonProtocol } "The Users ADM Route using the Authenticator trait" should { - - var token = new MutableTestString + val token = new MutableTestString "login in v2" in { /* Correct username and correct password */ diff --git a/integration/src/test/scala/org/knora/webapi/e2e/v2/OntologyV2R2RSpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/v2/OntologyV2R2RSpec.scala index f3630c0ca89..b6924991da1 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/v2/OntologyV2R2RSpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/v2/OntologyV2R2RSpec.scala @@ -154,6 +154,7 @@ class OntologyV2R2RSpec extends R2RSpec { Files.createDirectories(newOutputFile.getParent) FileUtil.writeTextFile(newOutputFile, responseStr) + () } /** diff --git a/integration/src/test/scala/org/knora/webapi/e2e/v2/ValuesRouteV2E2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/v2/ValuesRouteV2E2ESpec.scala index fe143f8f0b0..b7614636fa3 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/v2/ValuesRouteV2E2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/v2/ValuesRouteV2E2ESpec.scala @@ -8,6 +8,7 @@ package org.knora.webapi.e2e.v2 import org.apache.pekko.http.scaladsl.model.* import org.apache.pekko.http.scaladsl.model.headers.BasicHttpCredentials import org.apache.pekko.http.scaladsl.unmarshalling.Unmarshal +import org.scalatest.compatible.Assertion import org.xmlunit.builder.DiffBuilder import org.xmlunit.builder.Input import org.xmlunit.diff.Diff @@ -215,12 +216,12 @@ class ValuesRouteV2E2ESpec extends E2ESpec { resourceIri: IRI, maybePreviousLastModDate: Option[Instant], maybeUpdatedLastModDate: Option[Instant] - ): Unit = + ): Assertion = maybeUpdatedLastModDate match { case Some(updatedLastModDate) => maybePreviousLastModDate match { case Some(previousLastModDate) => assert(updatedLastModDate.isAfter(previousLastModDate)) - case None => () + case None => assert(true) } case None => throw AssertionException(s"Resource $resourceIri has no knora-api:lastModificationDate") diff --git a/integration/src/test/scala/org/knora/webapi/messages/admin/responder/usersmessages/UsersMessagesADMSpec.scala b/integration/src/test/scala/org/knora/webapi/messages/admin/responder/usersmessages/UsersMessagesADMSpec.scala index c68780d1554..13c052f11b2 100644 --- a/integration/src/test/scala/org/knora/webapi/messages/admin/responder/usersmessages/UsersMessagesADMSpec.scala +++ b/integration/src/test/scala/org/knora/webapi/messages/admin/responder/usersmessages/UsersMessagesADMSpec.scala @@ -10,7 +10,6 @@ import org.springframework.security.crypto.scrypt.SCryptPasswordEncoder import dsp.errors.BadRequestException import org.knora.webapi.* -import org.knora.webapi.messages.StringFormatter import org.knora.webapi.messages.admin.responder.permissionsmessages.PermissionProfileType import org.knora.webapi.messages.admin.responder.permissionsmessages.PermissionsDataADM import org.knora.webapi.sharedtestdata.SharedTestDataADM @@ -33,8 +32,6 @@ class UsersMessagesADMSpec extends CoreSpec { private val projects = SharedTestDataADM.rootUser.projects private val permissions = SharedTestDataADM.rootUser.permissions - private implicit val stringFormatter: StringFormatter = StringFormatter.getInstanceForConstantOntologies - "The UserADM case class" should { "return a RESTRICTED UserADM when requested " in { val rootUser = User( diff --git a/integration/src/test/scala/org/knora/webapi/messages/util/CalendarDateUtilV2Spec.scala b/integration/src/test/scala/org/knora/webapi/messages/util/CalendarDateUtilV2Spec.scala index ec3c789dc06..892cb00704b 100644 --- a/integration/src/test/scala/org/knora/webapi/messages/util/CalendarDateUtilV2Spec.scala +++ b/integration/src/test/scala/org/knora/webapi/messages/util/CalendarDateUtilV2Spec.scala @@ -5,6 +5,8 @@ package org.knora.webapi.util +import org.scalatest.compatible.Assertion + import dsp.errors.BadRequestException import org.knora.webapi.CoreSpec import org.knora.webapi.messages.util.* @@ -18,7 +20,7 @@ class CalendarDateUtilV2Spec extends CoreSpec { expectedStartJDN: Int, expectedEndJDN: Int, dateStr: String - ): Unit = { + ): Assertion = { val calendarDateRange = CalendarDateRangeV2( startCalendarDate = calendarDate, endCalendarDate = calendarDate @@ -37,7 +39,7 @@ class CalendarDateUtilV2Spec extends CoreSpec { expectedStartJDN: Int, expectedEndJDN: Int, dateStr: String - ): Unit = { + ): Assertion = { // Convert the date range to Julian Day Numbers and check that they're correct. val (startJDN: Int, endJDN: Int) = calendarDateRange.toJulianDayRange assert(startJDN == expectedStartJDN) diff --git a/integration/src/test/scala/org/knora/webapi/messages/util/rdf/RdfFormatUtilSpec.scala b/integration/src/test/scala/org/knora/webapi/messages/util/rdf/RdfFormatUtilSpec.scala index e0c3eb4c463..79cca3c71e1 100644 --- a/integration/src/test/scala/org/knora/webapi/messages/util/rdf/RdfFormatUtilSpec.scala +++ b/integration/src/test/scala/org/knora/webapi/messages/util/rdf/RdfFormatUtilSpec.scala @@ -6,6 +6,7 @@ package org.knora.webapi.util.rdf import org.apache.jena +import org.scalatest.compatible.Assertion import java.io.BufferedInputStream import java.io.ByteArrayInputStream @@ -30,7 +31,7 @@ import org.knora.webapi.util.FileUtil */ class RdfFormatUtilSpec() extends CoreSpec { - private def checkModelForRdfTypeBook(rdfModel: RdfModel, context: Option[IRI] = None): Unit = { + private def checkModelForRdfTypeBook(rdfModel: RdfModel, context: Option[IRI] = None): Assertion = { val statements: Set[Statement] = rdfModel .find( subj = Some(JenaNodeFactory.makeIriNode("http://rdfh.ch/0803/2a6221216701")), @@ -44,7 +45,7 @@ class RdfFormatUtilSpec() extends CoreSpec { assert(statements.head.obj == JenaNodeFactory.makeIriNode("http://0.0.0.0:3333/ontology/0803/incunabula/v2#book")) } - private def checkJsonLDDocumentForRdfTypeBook(jsonLDDocument: JsonLDDocument): Unit = + private def checkJsonLDDocumentForRdfTypeBook(jsonLDDocument: JsonLDDocument): Assertion = assert( jsonLDDocument.body .getRequiredString(JsonLDKeywords.TYPE) diff --git a/integration/src/test/scala/org/knora/webapi/messages/util/rdf/RdfModelSpec.scala b/integration/src/test/scala/org/knora/webapi/messages/util/rdf/RdfModelSpec.scala index 40563fa57aa..2d4a3dffb8f 100644 --- a/integration/src/test/scala/org/knora/webapi/messages/util/rdf/RdfModelSpec.scala +++ b/integration/src/test/scala/org/knora/webapi/messages/util/rdf/RdfModelSpec.scala @@ -5,12 +5,13 @@ package org.knora.webapi.util.rdf +import org.scalatest.compatible.Assertion + import java.io.BufferedInputStream import java.io.FileInputStream import dsp.errors.AssertionException import org.knora.webapi.CoreSpec -import org.knora.webapi.IRI import org.knora.webapi.messages.OntologyConstants import org.knora.webapi.messages.util.rdf.JenaRepository import org.knora.webapi.messages.util.rdf.* @@ -33,9 +34,8 @@ class RdfModelSpec() extends CoreSpec { private def addAndFindBySubjAndPred( subj: RdfResource, pred: IriNode, - obj: RdfNode, - context: Option[IRI] = None - ): Unit = { + obj: RdfNode + ): Assertion = { val statement: Statement = JenaNodeFactory.makeStatement(subj = subj, pred = pred, obj = obj) model.addStatement(statement) assert(model.find(subj = Some(subj), pred = Some(pred), obj = None).toSet == Set(statement)) diff --git a/integration/src/test/scala/org/knora/webapi/responders/v2/ListsResponderV2Spec.scala b/integration/src/test/scala/org/knora/webapi/responders/v2/ListsResponderV2Spec.scala index eb4d0c25615..e6e02fe99b2 100644 --- a/integration/src/test/scala/org/knora/webapi/responders/v2/ListsResponderV2Spec.scala +++ b/integration/src/test/scala/org/knora/webapi/responders/v2/ListsResponderV2Spec.scala @@ -8,7 +8,6 @@ package org.knora.webapi.responders.v2 import org.apache.pekko import org.knora.webapi.CoreSpec -import org.knora.webapi.messages.StringFormatter import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject import org.knora.webapi.messages.v2.responder.listsmessages.ListGetRequestV2 import org.knora.webapi.messages.v2.responder.listsmessages.ListGetResponseV2 @@ -22,9 +21,7 @@ import pekko.testkit.ImplicitSender * Tests [[ListsResponderV2]]. */ class ListsResponderV2Spec extends CoreSpec with ImplicitSender { - - private implicit val stringFormatter: StringFormatter = StringFormatter.getGeneralInstance - private val listsResponderV2SpecFullData = new ListsResponderV2SpecFullData + private val listsResponderV2SpecFullData = new ListsResponderV2SpecFullData override lazy val rdfDataObjects = List( RdfDataObject( diff --git a/integration/src/test/scala/org/knora/webapi/responders/v2/ListsResponderV2SpecFullData.scala b/integration/src/test/scala/org/knora/webapi/responders/v2/ListsResponderV2SpecFullData.scala index 8e9ada30f76..d8cf5e694b7 100644 --- a/integration/src/test/scala/org/knora/webapi/responders/v2/ListsResponderV2SpecFullData.scala +++ b/integration/src/test/scala/org/knora/webapi/responders/v2/ListsResponderV2SpecFullData.scala @@ -5,7 +5,6 @@ package org.knora.webapi.responders.v2 -import org.knora.webapi.messages.StringFormatter import org.knora.webapi.messages.admin.responder.listsmessages import org.knora.webapi.messages.admin.responder.listsmessages.ListADM import org.knora.webapi.messages.store.triplestoremessages.StringLiteralSequenceV2 @@ -14,7 +13,7 @@ import org.knora.webapi.messages.v2.responder.listsmessages.ListGetResponseV2 import org.knora.webapi.messages.v2.responder.listsmessages.NodeGetResponseV2 import org.knora.webapi.sharedtestdata.SharedListsTestDataADM -class ListsResponderV2SpecFullData(implicit stringFormatter: StringFormatter) { +class ListsResponderV2SpecFullData { val treeList = ListGetResponseV2( list = ListADM( diff --git a/integration/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala b/integration/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala index 64ecd218d34..2456dd51be0 100644 --- a/integration/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala +++ b/integration/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala @@ -94,7 +94,6 @@ class OntologyResponderV2Spec extends CoreSpec with ImplicitSender { private val printErrorMessages = false private var fooLastModDate: Instant = Instant.now private var barLastModDate: Instant = Instant.now - private var chairLastModDate: Instant = Instant.now private var anythingLastModDate: Instant = Instant.parse("2017-12-19T15:23:42.166Z") private var freetestLastModDate: Instant = Instant.parse("2012-12-12T12:12:12.12Z") @@ -164,7 +163,7 @@ class OntologyResponderV2Spec extends CoreSpec with ImplicitSender { "invalidate cached project information when adding an ontology to a project" in { // ernsure that the project is cached appActor ! ProjectGetRequestADM(ProjectIdentifierADM.IriIdentifier.unsafeFrom(imagesProjectIri.toString)) - val projectResponse = expectMsgType[ProjectGetResponseADM](timeout) + expectMsgType[ProjectGetResponseADM](timeout) appActor ! CacheServiceGetProjectADM(ProjectIdentifierADM.IriIdentifier.unsafeFrom(imagesProjectIri.toString)) val cachedProjectBefore = expectMsgType[Option[ProjectADM]](timeout) assert(cachedProjectBefore.isDefined) @@ -176,7 +175,7 @@ class OntologyResponderV2Spec extends CoreSpec with ImplicitSender { apiRequestID = UUID.randomUUID, requestingUser = imagesUser ) - val response = expectMsgType[ReadOntologyMetadataV2](timeout) + expectMsgType[ReadOntologyMetadataV2](timeout) // ensure that the project is no longer cached appActor ! CacheServiceGetProjectADM(ProjectIdentifierADM.IriIdentifier.unsafeFrom(imagesProjectIri.toString)) val cachedProject = expectMsgType[Option[ProjectADM]](timeout) @@ -648,7 +647,7 @@ class OntologyResponderV2Spec extends CoreSpec with ImplicitSender { val metadata = response.ontologies.head assert(metadata.ontologyIri.toString == "http://www.knora.org/ontology/shared/chair") chairIri.set(metadata.ontologyIri.toOntologySchema(ApiV2Complex).toString) - chairLastModDate = metadata.lastModificationDate.getOrElse( + metadata.lastModificationDate.getOrElse( throw AssertionException(s"${metadata.ontologyIri} has no last modification date") ) } diff --git a/integration/src/test/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala b/integration/src/test/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala index 73baaa16e6b..024e3489f43 100644 --- a/integration/src/test/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala +++ b/integration/src/test/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala @@ -480,6 +480,7 @@ class ResourcesResponderV2Spec extends CoreSpec with ImplicitSender { ) private def getResource(resourceIri: IRI, requestingUser: User): ReadResourceV2 = { + (requestingUser, requestingUser.id) // TODO: is this fine to remove? (silenced warning for now) appActor ! ResourcesGetRequestV2( resourceIris = Seq(resourceIri), targetSchema = ApiV2Complex, @@ -2494,7 +2495,7 @@ class ResourcesResponderV2Spec extends CoreSpec with ImplicitSender { val testValue = "a test value" // create new value. - val createValueResponse = UnsafeZioRun.runOrThrow( + UnsafeZioRun.runOrThrow( ValuesResponderV2.createValueV2( CreateValueV2( resourceIri = resourceIri, diff --git a/integration/src/test/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala b/integration/src/test/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala index d5d6adbb2df..95d742ca55e 100644 --- a/integration/src/test/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala +++ b/integration/src/test/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala @@ -6,6 +6,7 @@ package org.knora.webapi.responders.v2 import org.apache.pekko.testkit.ImplicitSender +import org.scalatest.compatible.Assertion import java.time.Instant import java.util.UUID @@ -237,7 +238,7 @@ class ValuesResponderV2Spec extends CoreSpec with ImplicitSender { deleteComment: Option[String] = None, requestingUser: User, isLinkValue: Boolean = false - ): Unit = { + ): Any = { appActor ! ResourcesGetRequestV2( resourceIris = Seq(resourceIri), targetSchema = ApiV2Complex, @@ -298,12 +299,12 @@ class ValuesResponderV2Spec extends CoreSpec with ImplicitSender { resourceIri: IRI, maybePreviousLastModDate: Option[Instant], maybeUpdatedLastModDate: Option[Instant] - ): Unit = + ): Assertion = maybeUpdatedLastModDate match { case Some(updatedLastModDate) => maybePreviousLastModDate match { case Some(previousLastModDate) => assert(updatedLastModDate.isAfter(previousLastModDate)) - case None => () + case None => assert(true) } case None => throw AssertionException(s"Resource $resourceIri has no knora-base:lastModificationDate") @@ -4324,7 +4325,8 @@ class ValuesResponderV2Spec extends CoreSpec with ImplicitSender { val deleteDate: Instant = Instant.now val deleteComment = Some("this value was incorrect") - val actual = UnsafeZioRun.run( + // TODO comment out + UnsafeZioRun.run( ValuesResponderV2.deleteValueV2( DeleteValueV2( resourceIri = resourceIri, diff --git a/integration/src/test/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1746Spec.scala b/integration/src/test/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1746Spec.scala index 8ddec86c9ed..4bcb2e9ae8a 100644 --- a/integration/src/test/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1746Spec.scala +++ b/integration/src/test/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1746Spec.scala @@ -6,13 +6,14 @@ package org.knora.webapi.store.triplestore.upgrade.plugins import com.typesafe.scalalogging.LazyLogging +import org.scalatest.compatible.Assertion import dsp.errors.AssertionException import org.knora.webapi.messages.OntologyConstants import org.knora.webapi.messages.util.rdf.* class UpgradePluginPR1746Spec extends UpgradePluginSpec with LazyLogging { - private def checkLiteral(model: RdfModel, subj: IriNode, pred: IriNode, expectedObj: RdfLiteral): Unit = + private def checkLiteral(model: RdfModel, subj: IriNode, pred: IriNode, expectedObj: RdfLiteral): Assertion = model .find( subj = Some(subj), diff --git a/integration/src/test/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1921Spec.scala b/integration/src/test/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1921Spec.scala index 4f3628e5abd..325932bfbab 100644 --- a/integration/src/test/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1921Spec.scala +++ b/integration/src/test/scala/org/knora/webapi/store/triplestore/upgrade/plugins/UpgradePluginPR1921Spec.scala @@ -6,12 +6,13 @@ package org.knora.webapi.store.triplestore.upgrade.plugins import com.typesafe.scalalogging.LazyLogging +import org.scalatest.compatible.Assertion import dsp.errors.AssertionException import org.knora.webapi.messages.util.rdf.* class UpgradePluginPR1921Spec extends UpgradePluginSpec with LazyLogging { - private def checkLiteral(model: RdfModel, subj: IriNode, pred: IriNode, expectedObj: RdfLiteral): Unit = + private def checkLiteral(model: RdfModel, subj: IriNode, pred: IriNode, expectedObj: RdfLiteral): Assertion = model .find( subj = Some(subj), diff --git a/webapi/src/main/scala/org/knora/webapi/config/AppConfig.scala b/webapi/src/main/scala/org/knora/webapi/config/AppConfig.scala index 0574cb29be0..ba4ce3dac94 100644 --- a/webapi/src/main/scala/org/knora/webapi/config/AppConfig.scala +++ b/webapi/src/main/scala/org/knora/webapi/config/AppConfig.scala @@ -203,8 +203,8 @@ final case class InstrumentationServerConfig( ) object AppConfig { - type AppConfigurations = - AppConfig & DspIngestConfig & InstrumentationServerConfig & JwtConfig & KnoraApi & Triplestore + type AppConfigurationsTest = AppConfig & DspIngestConfig & Triplestore + type AppConfigurations = AppConfigurationsTest & InstrumentationServerConfig & JwtConfig & KnoraApi val descriptor: Config[AppConfig] = deriveConfig[AppConfig].mapKey(toKebabCase) diff --git a/webapi/src/main/scala/org/knora/webapi/messages/util/PermissionUtilADM.scala b/webapi/src/main/scala/org/knora/webapi/messages/util/PermissionUtilADM.scala index 67100bf0438..601cf528f72 100644 --- a/webapi/src/main/scala/org/knora/webapi/messages/util/PermissionUtilADM.scala +++ b/webapi/src/main/scala/org/knora/webapi/messages/util/PermissionUtilADM.scala @@ -290,7 +290,6 @@ object PermissionUtilADM extends LazyLogging { * @return a [[PermissionComparisonResult]]. */ def comparePermissionsADM( - entityCreator: IRI, entityProject: IRI, permissionLiteralA: String, permissionLiteralB: String, diff --git a/webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala b/webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala index 75e7ca5aa84..31bfe337d05 100644 --- a/webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala +++ b/webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala @@ -814,7 +814,6 @@ final case class ResourcesResponderV2Live( // Make sure they don't give themselves higher permissions than they would get from the default permissions. val permissionComparisonResult: PermissionComparisonResult = PermissionUtilADM.comparePermissionsADM( - requestingUser.id, internalCreateResource.projectADM.id, validatedCustomPermissions, defaultResourcePermissions, @@ -1155,7 +1154,6 @@ final case class ResourcesResponderV2Live( val permissionComparisonResult: PermissionComparisonResult = PermissionUtilADM.comparePermissionsADM( - entityCreator = requestingUser.id, entityProject = project.id, permissionLiteralA = validatedCustomPermissions, permissionLiteralB = defaultPropertyPermissions(propertyIri), diff --git a/webapi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala b/webapi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala index 15da33c1e41..e25d7a0951b 100644 --- a/webapi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala +++ b/webapi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala @@ -298,7 +298,6 @@ final case class ValuesResponderV2Live( // No. Make sure they don't give themselves higher permissions than they would get from the default permissions. val permissionComparisonResult: PermissionComparisonResult = PermissionUtilADM.comparePermissionsADM( - entityCreator = requestingUser.id, entityProject = resourceInfo.projectADM.id, permissionLiteralA = validatedCustomPermissions, permissionLiteralB = defaultValuePermissions, diff --git a/webapi/src/main/scala/org/knora/webapi/slice/admin/api/UsersEndpoints.scala b/webapi/src/main/scala/org/knora/webapi/slice/admin/api/UsersEndpoints.scala index bf6f8f8985d..9b7ec6097fd 100644 --- a/webapi/src/main/scala/org/knora/webapi/slice/admin/api/UsersEndpoints.scala +++ b/webapi/src/main/scala/org/knora/webapi/slice/admin/api/UsersEndpoints.scala @@ -129,7 +129,6 @@ object UsersEndpoints { systemAdmin: SystemAdmin ) object UserCreateRequest { - import sttp.tapir.generic.auto.* import Codecs.ZioJsonCodec.* implicit val jsonCodec: JsonCodec[UserCreateRequest] = DeriveJsonCodec.gen[UserCreateRequest] } diff --git a/webapi/src/main/scala/org/knora/webapi/slice/infrastructure/MetricsServer.scala b/webapi/src/main/scala/org/knora/webapi/slice/infrastructure/MetricsServer.scala index 8d3c1c7c8d0..6549cbf73ce 100644 --- a/webapi/src/main/scala/org/knora/webapi/slice/infrastructure/MetricsServer.scala +++ b/webapi/src/main/scala/org/knora/webapi/slice/infrastructure/MetricsServer.scala @@ -31,7 +31,7 @@ object MetricsServer { docs <- DocsServer.docsEndpoints.map(endpoints => ZioHttpInterpreter().toHttp(endpoints)) prometheus <- ZIO.service[PrometheusApp] _ <- Server.install(prometheus.route ++ docs) - _ <- ZIO.never + _ <- ZIO.never.as(()) } yield () val make: ZIO[KnoraApi & State & InstrumentationServerConfig & ApiV2Endpoints & AdminApiEndpoints, Throwable, Unit] = @@ -48,7 +48,7 @@ object MetricsServer { s"find docs on ${knoraApiConfig.externalProtocol}://${knoraApiConfig.externalHost}:$port/docs" ) _ <- metricsServer - .provideSome[State]( + .provideSome( ZLayer.succeed(knoraApiConfig), ZLayer.succeed(adminApiEndpoints), ZLayer.succeed(apiV2Endpoints), diff --git a/webapi/src/test/scala/org/knora/webapi/slice/common/repo/rdf/RdfModelSpec.scala b/webapi/src/test/scala/org/knora/webapi/slice/common/repo/rdf/RdfModelSpec.scala index 3fe5531124d..11568fa78b7 100644 --- a/webapi/src/test/scala/org/knora/webapi/slice/common/repo/rdf/RdfModelSpec.scala +++ b/webapi/src/test/scala/org/knora/webapi/slice/common/repo/rdf/RdfModelSpec.scala @@ -20,7 +20,7 @@ object RdfModelSpec extends ZIOSpecDefault { private case class FailingStringContainer(value: String) private implicit val failingStringContainerConverter: String => Either[String, FailingStringContainer] = - str => Left("Conversion failed") + _ => Left("Conversion failed") private case class LangStringContainer(value: LangString) private implicit val langStringContainerConverter: LangString => Either[String, LangStringContainer] = @@ -28,7 +28,7 @@ object RdfModelSpec extends ZIOSpecDefault { private case class FailingLangStringContainer(value: LangString) private implicit val failingLangStringContainerConverter: LangString => Either[String, FailingLangStringContainer] = - langString => Left("Conversion failed") + _ => Left("Conversion failed") private case class BooleanContainer(value: Boolean) private implicit val booleanContainerConverter: Boolean => Either[String, BooleanContainer] = @@ -36,7 +36,7 @@ object RdfModelSpec extends ZIOSpecDefault { private case class FailingBooleanContainer(value: Boolean) private implicit val failingBooleanContainerConverter: Boolean => Either[String, FailingBooleanContainer] = - bool => Left("Conversion failed") + _ => Left("Conversion failed") private val rdfModelSuite = suite("RdfModel")( suite("Deserialize turtle")(