From b88d0e08b0ccf1a065aff30b64397abe84c051c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinbo=CC=88lting?= Date: Thu, 15 Dec 2022 12:50:36 +0100 Subject: [PATCH 1/9] wip - LayersTest // extract common layer --- .../org/knora/webapi/core/LayersTest.scala | 66 ++++++++----------- .../org/knora/webapi/core/HttpServer.scala | 2 +- 2 files changed, 27 insertions(+), 41 deletions(-) diff --git a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala index 1cef56af8d..8be43e316d 100644 --- a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala +++ b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala @@ -1,12 +1,15 @@ package org.knora.webapi.core import zio.ZLayer + import org.knora.webapi.auth.JWTService +import org.knora.webapi.config.AppConfig import org.knora.webapi.config.AppConfigForTestContainers import org.knora.webapi.routing.ApiRoutes import org.knora.webapi.store.cache.CacheServiceManager import org.knora.webapi.store.cache.impl.CacheServiceInMemImpl import org.knora.webapi.store.iiif.IIIFServiceManager +import org.knora.webapi.store.iiif.api.IIIFService import org.knora.webapi.store.iiif.impl.IIIFServiceMockImpl import org.knora.webapi.store.iiif.impl.IIIFServiceSipiImpl import org.knora.webapi.store.triplestore.TriplestoreServiceManager @@ -24,30 +27,37 @@ object LayersTest { type DefaultTestEnvironmentWithoutSipi = LayersLive.DspEnvironmentLive with FusekiTestContainer with TestClientService type DefaultTestEnvironmentWithSipi = DefaultTestEnvironmentWithoutSipi with SipiTestContainer + val common = + ZLayer.makeSome[ + ActorSystem with CacheServiceManager with IIIFService with TriplestoreServiceManager with AppConfig, + AppRouter with ApiRoutes with State with HttpServer with IIIFServiceManager with TestClientService + ]( + ApiRoutes.layer, + AppRouter.layer, + HttpServer.layer, + IIIFServiceManager.layer, + State.layer, + TestClientService.layer + ) + /** * All live layers with both Fuseki and Sipi testcontainers */ val defaultLayersTestWithSipi = ZLayer.make[DefaultTestEnvironmentWithSipi]( ActorSystem.layer, - ApiRoutes.layer, AppConfigForTestContainers.testcontainers, - AppRouter.layer, + common, CacheServiceManager.layer, CacheServiceInMemImpl.layer, - HttpServer.layer, - IIIFServiceManager.layer, IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer JWTService.layer, RepositoryUpdater.layer, - State.layer, TriplestoreServiceManager.layer, TriplestoreServiceHttpConnectorImpl.layer, // testcontainers SipiTestContainer.layer, - FusekiTestContainer.layer, - // Test services - TestClientService.layer + FusekiTestContainer.layer ) /** @@ -56,23 +66,17 @@ object LayersTest { val defaultLayersTestWithoutSipi = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( ActorSystem.layer, - ApiRoutes.layer, AppConfigForTestContainers.fusekiOnlyTestcontainer, - AppRouter.layer, + common, CacheServiceManager.layer, CacheServiceInMemImpl.layer, - HttpServer.layer, - IIIFServiceManager.layer, IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer JWTService.layer, RepositoryUpdater.layer, - State.layer, TriplestoreServiceManager.layer, TriplestoreServiceHttpConnectorImpl.layer, // testcontainers - FusekiTestContainer.layer, - // Test services - TestClientService.layer + FusekiTestContainer.layer ) /** @@ -81,23 +85,17 @@ object LayersTest { def defaultLayersTestWithoutSipi(system: akka.actor.ActorSystem) = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( ActorSystemTest.layer(system), - ApiRoutes.layer, AppConfigForTestContainers.fusekiOnlyTestcontainer, - AppRouter.layer, + common, CacheServiceManager.layer, CacheServiceInMemImpl.layer, - HttpServer.layer, - IIIFServiceManager.layer, IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer JWTService.layer, RepositoryUpdater.layer, - State.layer, TriplestoreServiceManager.layer, TriplestoreServiceHttpConnectorImpl.layer, // testcontainers - FusekiTestContainer.layer, - // Test services - TestClientService.layer + FusekiTestContainer.layer ) /** @@ -106,23 +104,17 @@ object LayersTest { val defaultLayersTestWithMockedSipi = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( ActorSystem.layer, - ApiRoutes.layer, AppConfigForTestContainers.fusekiOnlyTestcontainer, - AppRouter.layer, + common, CacheServiceManager.layer, CacheServiceInMemImpl.layer, - HttpServer.layer, - IIIFServiceManager.layer, IIIFServiceMockImpl.layer, JWTService.layer, RepositoryUpdater.layer, - State.layer, TriplestoreServiceManager.layer, TriplestoreServiceHttpConnectorImpl.layer, // testcontainers - FusekiTestContainer.layer, - // Test services - TestClientService.layer + FusekiTestContainer.layer ) /** @@ -131,22 +123,16 @@ object LayersTest { def defaultLayersTestWithMockedSipi(system: akka.actor.ActorSystem) = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( ActorSystemTest.layer(system), - ApiRoutes.layer, AppConfigForTestContainers.fusekiOnlyTestcontainer, - AppRouter.layer, + common, CacheServiceManager.layer, CacheServiceInMemImpl.layer, - HttpServer.layer, - IIIFServiceManager.layer, IIIFServiceMockImpl.layer, JWTService.layer, RepositoryUpdater.layer, - State.layer, TriplestoreServiceManager.layer, TriplestoreServiceHttpConnectorImpl.layer, // testcontainers - FusekiTestContainer.layer, - // Test services - TestClientService.layer + FusekiTestContainer.layer ) } diff --git a/webapi/src/main/scala/org/knora/webapi/core/HttpServer.scala b/webapi/src/main/scala/org/knora/webapi/core/HttpServer.scala index 811383f14a..5981d04821 100644 --- a/webapi/src/main/scala/org/knora/webapi/core/HttpServer.scala +++ b/webapi/src/main/scala/org/knora/webapi/core/HttpServer.scala @@ -20,7 +20,7 @@ trait HttpServer { } object HttpServer { - val layer: ZLayer[core.ActorSystem & AppConfig & ApiRoutes, Nothing, HttpServer] = + val layer: ZLayer[ActorSystem with AppConfig with ApiRoutes, Nothing, HttpServer] = ZLayer.scoped { for { as <- ZIO.service[core.ActorSystem] From 686c208e4d95e316f0bfa63604e70b086e91a37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinbo=CC=88lting?= Date: Thu, 15 Dec 2022 17:15:13 +0100 Subject: [PATCH 2/9] wip - LayersTest // extract common layer --- .../org/knora/webapi/core/LayersTest.scala | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala index 8be43e316d..a845511ed2 100644 --- a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala +++ b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala @@ -13,6 +13,7 @@ import org.knora.webapi.store.iiif.api.IIIFService import org.knora.webapi.store.iiif.impl.IIIFServiceMockImpl import org.knora.webapi.store.iiif.impl.IIIFServiceSipiImpl import org.knora.webapi.store.triplestore.TriplestoreServiceManager +import org.knora.webapi.store.triplestore.api.TriplestoreService import org.knora.webapi.store.triplestore.impl.TriplestoreServiceHttpConnectorImpl import org.knora.webapi.store.triplestore.upgrade.RepositoryUpdater import org.knora.webapi.testcontainers.FusekiTestContainer @@ -29,15 +30,17 @@ object LayersTest { val common = ZLayer.makeSome[ - ActorSystem with CacheServiceManager with IIIFService with TriplestoreServiceManager with AppConfig, - AppRouter with ApiRoutes with State with HttpServer with IIIFServiceManager with TestClientService + ActorSystem with CacheServiceManager with IIIFService with TriplestoreService with AppConfig, + AppRouter with ApiRoutes with State with HttpServer with IIIFServiceManager with TestClientService with RepositoryUpdater with TriplestoreServiceManager ]( ApiRoutes.layer, AppRouter.layer, HttpServer.layer, IIIFServiceManager.layer, State.layer, - TestClientService.layer + TestClientService.layer, + RepositoryUpdater.layer, + TriplestoreServiceManager.layer ) /** @@ -52,8 +55,6 @@ object LayersTest { CacheServiceInMemImpl.layer, IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer JWTService.layer, - RepositoryUpdater.layer, - TriplestoreServiceManager.layer, TriplestoreServiceHttpConnectorImpl.layer, // testcontainers SipiTestContainer.layer, @@ -72,8 +73,6 @@ object LayersTest { CacheServiceInMemImpl.layer, IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer JWTService.layer, - RepositoryUpdater.layer, - TriplestoreServiceManager.layer, TriplestoreServiceHttpConnectorImpl.layer, // testcontainers FusekiTestContainer.layer @@ -91,8 +90,6 @@ object LayersTest { CacheServiceInMemImpl.layer, IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer JWTService.layer, - RepositoryUpdater.layer, - TriplestoreServiceManager.layer, TriplestoreServiceHttpConnectorImpl.layer, // testcontainers FusekiTestContainer.layer @@ -110,8 +107,6 @@ object LayersTest { CacheServiceInMemImpl.layer, IIIFServiceMockImpl.layer, JWTService.layer, - RepositoryUpdater.layer, - TriplestoreServiceManager.layer, TriplestoreServiceHttpConnectorImpl.layer, // testcontainers FusekiTestContainer.layer @@ -129,8 +124,6 @@ object LayersTest { CacheServiceInMemImpl.layer, IIIFServiceMockImpl.layer, JWTService.layer, - RepositoryUpdater.layer, - TriplestoreServiceManager.layer, TriplestoreServiceHttpConnectorImpl.layer, // testcontainers FusekiTestContainer.layer From e7aa6c0f0a81c9acf1c1bb1c020aae2f3672a6c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinbo=CC=88lting?= Date: Thu, 15 Dec 2022 17:46:01 +0100 Subject: [PATCH 3/9] wip - LayersTest // extract common layer --- .../org/knora/webapi/core/LayersTest.scala | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala index a845511ed2..e5665952cb 100644 --- a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala +++ b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala @@ -7,6 +7,7 @@ import org.knora.webapi.config.AppConfig import org.knora.webapi.config.AppConfigForTestContainers import org.knora.webapi.routing.ApiRoutes import org.knora.webapi.store.cache.CacheServiceManager +import org.knora.webapi.store.cache.api.CacheService import org.knora.webapi.store.cache.impl.CacheServiceInMemImpl import org.knora.webapi.store.iiif.IIIFServiceManager import org.knora.webapi.store.iiif.api.IIIFService @@ -30,8 +31,8 @@ object LayersTest { val common = ZLayer.makeSome[ - ActorSystem with CacheServiceManager with IIIFService with TriplestoreService with AppConfig, - AppRouter with ApiRoutes with State with HttpServer with IIIFServiceManager with TestClientService with RepositoryUpdater with TriplestoreServiceManager + ActorSystem with IIIFService with TriplestoreService with AppConfig, + AppRouter with ApiRoutes with State with HttpServer with IIIFServiceManager with TestClientService with RepositoryUpdater with TriplestoreServiceManager with CacheService with CacheServiceManager ]( ApiRoutes.layer, AppRouter.layer, @@ -40,7 +41,9 @@ object LayersTest { State.layer, TestClientService.layer, RepositoryUpdater.layer, - TriplestoreServiceManager.layer + TriplestoreServiceManager.layer, + CacheServiceInMemImpl.layer, + CacheServiceManager.layer ) /** @@ -51,8 +54,6 @@ object LayersTest { ActorSystem.layer, AppConfigForTestContainers.testcontainers, common, - CacheServiceManager.layer, - CacheServiceInMemImpl.layer, IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer JWTService.layer, TriplestoreServiceHttpConnectorImpl.layer, @@ -69,8 +70,6 @@ object LayersTest { ActorSystem.layer, AppConfigForTestContainers.fusekiOnlyTestcontainer, common, - CacheServiceManager.layer, - CacheServiceInMemImpl.layer, IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer JWTService.layer, TriplestoreServiceHttpConnectorImpl.layer, @@ -86,8 +85,6 @@ object LayersTest { ActorSystemTest.layer(system), AppConfigForTestContainers.fusekiOnlyTestcontainer, common, - CacheServiceManager.layer, - CacheServiceInMemImpl.layer, IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer JWTService.layer, TriplestoreServiceHttpConnectorImpl.layer, @@ -103,8 +100,6 @@ object LayersTest { ActorSystem.layer, AppConfigForTestContainers.fusekiOnlyTestcontainer, common, - CacheServiceManager.layer, - CacheServiceInMemImpl.layer, IIIFServiceMockImpl.layer, JWTService.layer, TriplestoreServiceHttpConnectorImpl.layer, @@ -120,8 +115,6 @@ object LayersTest { ActorSystemTest.layer(system), AppConfigForTestContainers.fusekiOnlyTestcontainer, common, - CacheServiceManager.layer, - CacheServiceInMemImpl.layer, IIIFServiceMockImpl.layer, JWTService.layer, TriplestoreServiceHttpConnectorImpl.layer, From 01b54e80a8a991dc82dff4adac9a51a78bec3b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinbo=CC=88lting?= Date: Thu, 15 Dec 2022 17:47:25 +0100 Subject: [PATCH 4/9] wip - LayersTest // extract common layer --- .../org/knora/webapi/core/LayersTest.scala | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala index e5665952cb..75b5b16390 100644 --- a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala +++ b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala @@ -31,8 +31,8 @@ object LayersTest { val common = ZLayer.makeSome[ - ActorSystem with IIIFService with TriplestoreService with AppConfig, - AppRouter with ApiRoutes with State with HttpServer with IIIFServiceManager with TestClientService with RepositoryUpdater with TriplestoreServiceManager with CacheService with CacheServiceManager + ActorSystem with IIIFService with AppConfig, + AppRouter with ApiRoutes with State with HttpServer with IIIFServiceManager with TestClientService with RepositoryUpdater with TriplestoreServiceManager with CacheService with CacheServiceManager with TriplestoreService ]( ApiRoutes.layer, AppRouter.layer, @@ -43,7 +43,8 @@ object LayersTest { RepositoryUpdater.layer, TriplestoreServiceManager.layer, CacheServiceInMemImpl.layer, - CacheServiceManager.layer + CacheServiceManager.layer, + TriplestoreServiceHttpConnectorImpl.layer ) /** @@ -56,8 +57,6 @@ object LayersTest { common, IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer JWTService.layer, - TriplestoreServiceHttpConnectorImpl.layer, - // testcontainers SipiTestContainer.layer, FusekiTestContainer.layer ) @@ -72,8 +71,6 @@ object LayersTest { common, IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer JWTService.layer, - TriplestoreServiceHttpConnectorImpl.layer, - // testcontainers FusekiTestContainer.layer ) @@ -87,8 +84,6 @@ object LayersTest { common, IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer JWTService.layer, - TriplestoreServiceHttpConnectorImpl.layer, - // testcontainers FusekiTestContainer.layer ) @@ -102,8 +97,6 @@ object LayersTest { common, IIIFServiceMockImpl.layer, JWTService.layer, - TriplestoreServiceHttpConnectorImpl.layer, - // testcontainers FusekiTestContainer.layer ) @@ -117,8 +110,6 @@ object LayersTest { common, IIIFServiceMockImpl.layer, JWTService.layer, - TriplestoreServiceHttpConnectorImpl.layer, - // testcontainers FusekiTestContainer.layer ) } From 0c819b36b804c2a180b96eb69144e2a8456e4569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinbo=CC=88lting?= Date: Thu, 15 Dec 2022 17:47:46 +0100 Subject: [PATCH 5/9] wip - LayersTest // extract common layer --- .../it/scala/org/knora/webapi/core/LayersTest.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala index 75b5b16390..2253a1f966 100644 --- a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala +++ b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala @@ -36,15 +36,15 @@ object LayersTest { ]( ApiRoutes.layer, AppRouter.layer, + CacheServiceInMemImpl.layer, + CacheServiceManager.layer, HttpServer.layer, IIIFServiceManager.layer, + RepositoryUpdater.layer, State.layer, TestClientService.layer, - RepositoryUpdater.layer, - TriplestoreServiceManager.layer, - CacheServiceInMemImpl.layer, - CacheServiceManager.layer, - TriplestoreServiceHttpConnectorImpl.layer + TriplestoreServiceHttpConnectorImpl.layer, + TriplestoreServiceManager.layer ) /** From 4faf26a823742b8acca395ceb17431edfd084d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinbo=CC=88lting?= Date: Thu, 15 Dec 2022 17:51:25 +0100 Subject: [PATCH 6/9] wip - LayersTest // extract common layer --- .../org/knora/webapi/core/LayersTest.scala | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala index 2253a1f966..efd60d2efe 100644 --- a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala +++ b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala @@ -52,13 +52,13 @@ object LayersTest { */ val defaultLayersTestWithSipi = ZLayer.make[DefaultTestEnvironmentWithSipi]( + common, ActorSystem.layer, AppConfigForTestContainers.testcontainers, - common, - IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer + FusekiTestContainer.layer, + IIIFServiceSipiImpl.layer, JWTService.layer, - SipiTestContainer.layer, - FusekiTestContainer.layer + SipiTestContainer.layer ) /** @@ -66,12 +66,12 @@ object LayersTest { */ val defaultLayersTestWithoutSipi = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( + common, ActorSystem.layer, AppConfigForTestContainers.fusekiOnlyTestcontainer, - common, - IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer - JWTService.layer, - FusekiTestContainer.layer + FusekiTestContainer.layer, + IIIFServiceSipiImpl.layer, + JWTService.layer ) /** @@ -79,12 +79,12 @@ object LayersTest { */ def defaultLayersTestWithoutSipi(system: akka.actor.ActorSystem) = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( + common, ActorSystemTest.layer(system), AppConfigForTestContainers.fusekiOnlyTestcontainer, - common, - IIIFServiceSipiImpl.layer, // alternative: MockSipiImpl.layer - JWTService.layer, - FusekiTestContainer.layer + FusekiTestContainer.layer, + IIIFServiceSipiImpl.layer, + JWTService.layer ) /** @@ -92,12 +92,12 @@ object LayersTest { */ val defaultLayersTestWithMockedSipi = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( + common, ActorSystem.layer, AppConfigForTestContainers.fusekiOnlyTestcontainer, - common, + FusekiTestContainer.layer, IIIFServiceMockImpl.layer, - JWTService.layer, - FusekiTestContainer.layer + JWTService.layer ) /** @@ -105,11 +105,11 @@ object LayersTest { */ def defaultLayersTestWithMockedSipi(system: akka.actor.ActorSystem) = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( + common, ActorSystemTest.layer(system), AppConfigForTestContainers.fusekiOnlyTestcontainer, - common, + FusekiTestContainer.layer, IIIFServiceMockImpl.layer, - JWTService.layer, - FusekiTestContainer.layer + JWTService.layer ) } From 5aee0bc270516727bb3bf6307174eac2c15387c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinbo=CC=88lting?= Date: Thu, 15 Dec 2022 17:56:05 +0100 Subject: [PATCH 7/9] wip - LayersTest // extract common layer --- .../org/knora/webapi/core/LayersTest.scala | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala index efd60d2efe..ac141b44ae 100644 --- a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala +++ b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala @@ -29,11 +29,21 @@ object LayersTest { type DefaultTestEnvironmentWithoutSipi = LayersLive.DspEnvironmentLive with FusekiTestContainer with TestClientService type DefaultTestEnvironmentWithSipi = DefaultTestEnvironmentWithoutSipi with SipiTestContainer - val common = - ZLayer.makeSome[ - ActorSystem with IIIFService with AppConfig, - AppRouter with ApiRoutes with State with HttpServer with IIIFServiceManager with TestClientService with RepositoryUpdater with TriplestoreServiceManager with CacheService with CacheServiceManager with TriplestoreService - ]( + type CommonR0 = ActorSystem with IIIFService with AppConfig + type CommonR = ApiRoutes + with AppRouter + with CacheService + with CacheServiceManager + with HttpServer + with IIIFServiceManager + with RepositoryUpdater + with State + with TestClientService + with TriplestoreService + with TriplestoreServiceManager + + private val commonLayersForAllIntegrationTests = + ZLayer.makeSome[CommonR0, CommonR]( ApiRoutes.layer, AppRouter.layer, CacheServiceInMemImpl.layer, @@ -52,7 +62,7 @@ object LayersTest { */ val defaultLayersTestWithSipi = ZLayer.make[DefaultTestEnvironmentWithSipi]( - common, + commonLayersForAllIntegrationTests, ActorSystem.layer, AppConfigForTestContainers.testcontainers, FusekiTestContainer.layer, @@ -66,7 +76,7 @@ object LayersTest { */ val defaultLayersTestWithoutSipi = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( - common, + commonLayersForAllIntegrationTests, ActorSystem.layer, AppConfigForTestContainers.fusekiOnlyTestcontainer, FusekiTestContainer.layer, @@ -79,7 +89,7 @@ object LayersTest { */ def defaultLayersTestWithoutSipi(system: akka.actor.ActorSystem) = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( - common, + commonLayersForAllIntegrationTests, ActorSystemTest.layer(system), AppConfigForTestContainers.fusekiOnlyTestcontainer, FusekiTestContainer.layer, @@ -92,7 +102,7 @@ object LayersTest { */ val defaultLayersTestWithMockedSipi = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( - common, + commonLayersForAllIntegrationTests, ActorSystem.layer, AppConfigForTestContainers.fusekiOnlyTestcontainer, FusekiTestContainer.layer, @@ -105,7 +115,7 @@ object LayersTest { */ def defaultLayersTestWithMockedSipi(system: akka.actor.ActorSystem) = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( - common, + commonLayersForAllIntegrationTests, ActorSystemTest.layer(system), AppConfigForTestContainers.fusekiOnlyTestcontainer, FusekiTestContainer.layer, From 13eda52bbd7ba51338f2be6882a7f0d5a344e512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinbo=CC=88lting?= Date: Fri, 16 Dec 2022 13:55:36 +0100 Subject: [PATCH 8/9] reduce integration test layers to two --- .../it/scala/org/knora/webapi/CoreSpec.scala | 2 +- .../it/scala/org/knora/webapi/E2ESpec.scala | 2 +- .../org/knora/webapi/ITKnoraLiveSpec.scala | 2 +- .../it/scala/org/knora/webapi/R2RSpec.scala | 2 +- .../org/knora/webapi/core/LayersTest.scala | 66 +++++++------------ .../knora/webapi/e2e/v1/SipiV1R2RSpec.scala | 2 +- .../knora/webapi/e2e/v2/ValuesV2R2RSpec.scala | 2 +- .../v1/ResourcesResponderV1Spec.scala | 2 +- .../responders/v1/ValuesResponderV1Spec.scala | 2 +- .../v2/ResourcesResponderV2Spec.scala | 2 +- .../responders/v2/ValuesResponderV2Spec.scala | 2 +- 11 files changed, 32 insertions(+), 54 deletions(-) diff --git a/webapi/src/it/scala/org/knora/webapi/CoreSpec.scala b/webapi/src/it/scala/org/knora/webapi/CoreSpec.scala index d83f943cdf..6e2b324e95 100644 --- a/webapi/src/it/scala/org/knora/webapi/CoreSpec.scala +++ b/webapi/src/it/scala/org/knora/webapi/CoreSpec.scala @@ -43,7 +43,7 @@ abstract class CoreSpec * The effect layers from which the App is built. * Can be overriden in specs that need other implementations. */ - lazy val effectLayers = core.LayersTest.defaultLayersTestWithoutSipi + lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer() /** * `Bootstrap` will ensure that everything is instantiated when the Runtime is created diff --git a/webapi/src/it/scala/org/knora/webapi/E2ESpec.scala b/webapi/src/it/scala/org/knora/webapi/E2ESpec.scala index 2d7e38398e..f0d2000132 100644 --- a/webapi/src/it/scala/org/knora/webapi/E2ESpec.scala +++ b/webapi/src/it/scala/org/knora/webapi/E2ESpec.scala @@ -67,7 +67,7 @@ abstract class E2ESpec * The effect layers from which the App is built. * Can be overriden in specs that need other implementations. */ - lazy val effectLayers = core.LayersTest.defaultLayersTestWithoutSipi + lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer() /** * `Bootstrap` will ensure that everything is instantiated when the Runtime is created diff --git a/webapi/src/it/scala/org/knora/webapi/ITKnoraLiveSpec.scala b/webapi/src/it/scala/org/knora/webapi/ITKnoraLiveSpec.scala index 9b0055f466..0a45947be3 100644 --- a/webapi/src/it/scala/org/knora/webapi/ITKnoraLiveSpec.scala +++ b/webapi/src/it/scala/org/knora/webapi/ITKnoraLiveSpec.scala @@ -59,7 +59,7 @@ abstract class ITKnoraLiveSpec * The effect layers from which the App is built. * Can be overriden in specs that need other implementations. */ - lazy val effectLayers = core.LayersTest.defaultLayersTestWithSipi + lazy val effectLayers = core.LayersTest.integrationTestsWithSipiAndFusekiTestcontainers /** * `Bootstrap` will ensure that everything is instantiated when the Runtime is created diff --git a/webapi/src/it/scala/org/knora/webapi/R2RSpec.scala b/webapi/src/it/scala/org/knora/webapi/R2RSpec.scala index b24687e37f..501e24705b 100644 --- a/webapi/src/it/scala/org/knora/webapi/R2RSpec.scala +++ b/webapi/src/it/scala/org/knora/webapi/R2RSpec.scala @@ -50,7 +50,7 @@ abstract class R2RSpec * The effect layers from which the App is built. * Can be overriden in specs that need other implementations. */ - lazy val effectLayers = core.LayersTest.defaultLayersTestWithoutSipi(system) + lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer(Some(system)) /** * `Bootstrap` will ensure that everything is instantiated when the Runtime is created diff --git a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala index ac141b44ae..5a13f322df 100644 --- a/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala +++ b/webapi/src/it/scala/org/knora/webapi/core/LayersTest.scala @@ -1,5 +1,6 @@ package org.knora.webapi.core +import zio.ULayer import zio.ZLayer import org.knora.webapi.auth.JWTService @@ -57,69 +58,46 @@ object LayersTest { TriplestoreServiceManager.layer ) - /** - * All live layers with both Fuseki and Sipi testcontainers - */ - val defaultLayersTestWithSipi = - ZLayer.make[DefaultTestEnvironmentWithSipi]( - commonLayersForAllIntegrationTests, - ActorSystem.layer, + private val fusekiAndSipiTestcontainers = + ZLayer.make[FusekiTestContainer with SipiTestContainer with AppConfig with JWTService with IIIFService]( AppConfigForTestContainers.testcontainers, FusekiTestContainer.layer, - IIIFServiceSipiImpl.layer, - JWTService.layer, - SipiTestContainer.layer - ) - - /** - * All live layers - with ActorSystem - but without Sipi testcontainer - */ - val defaultLayersTestWithoutSipi = - ZLayer.make[DefaultTestEnvironmentWithoutSipi]( - commonLayersForAllIntegrationTests, - ActorSystem.layer, - AppConfigForTestContainers.fusekiOnlyTestcontainer, - FusekiTestContainer.layer, + SipiTestContainer.layer, IIIFServiceSipiImpl.layer, JWTService.layer ) - /** - * All live layers - with ActorSystemTest - but without Sipi testcontainer - */ - def defaultLayersTestWithoutSipi(system: akka.actor.ActorSystem) = - ZLayer.make[DefaultTestEnvironmentWithoutSipi]( - commonLayersForAllIntegrationTests, - ActorSystemTest.layer(system), + private val fusekiTestcontainers = + ZLayer.make[FusekiTestContainer with AppConfig with JWTService with IIIFService]( AppConfigForTestContainers.fusekiOnlyTestcontainer, FusekiTestContainer.layer, - IIIFServiceSipiImpl.layer, + IIIFServiceMockImpl.layer, JWTService.layer ) /** - * All live layers - with ActorSystemTest - but with the mocked IIIF layer + * Provides a layer for integration tests which depend on Fuseki as Testcontainers. + * Sipi/IIIFService will be mocked with the [[IIIFServiceMockImpl.l]] + * @param system An optional [[akka.actor.ActorSystem]] for use with Akka's [[akka.testkit.TestKit]] + * @return a [[ULayer]] with the [[DefaultTestEnvironmentWithoutSipi]] */ - val defaultLayersTestWithMockedSipi = + def integrationTestsWithFusekiTestcontainers( + system: Option[akka.actor.ActorSystem] = None + ): ULayer[DefaultTestEnvironmentWithoutSipi] = ZLayer.make[DefaultTestEnvironmentWithoutSipi]( commonLayersForAllIntegrationTests, - ActorSystem.layer, - AppConfigForTestContainers.fusekiOnlyTestcontainer, - FusekiTestContainer.layer, - IIIFServiceMockImpl.layer, - JWTService.layer + fusekiTestcontainers, + system.map(ActorSystemTest.layer).getOrElse(ActorSystem.layer) ) /** - * All live layers - with ActorSystemTest - but with the mocked IIIF layer + * Provides a layer for integration tests which depend on Fuseki and Sipi as Testcontainers. + * @return a [[ULayer]] with the [[DefaultTestEnvironmentWithSipi]] */ - def defaultLayersTestWithMockedSipi(system: akka.actor.ActorSystem) = - ZLayer.make[DefaultTestEnvironmentWithoutSipi]( + val integrationTestsWithSipiAndFusekiTestcontainers: ULayer[DefaultTestEnvironmentWithSipi] = + ZLayer.make[DefaultTestEnvironmentWithSipi]( commonLayersForAllIntegrationTests, - ActorSystemTest.layer(system), - AppConfigForTestContainers.fusekiOnlyTestcontainer, - FusekiTestContainer.layer, - IIIFServiceMockImpl.layer, - JWTService.layer + fusekiAndSipiTestcontainers, + ActorSystem.layer ) } diff --git a/webapi/src/it/scala/org/knora/webapi/e2e/v1/SipiV1R2RSpec.scala b/webapi/src/it/scala/org/knora/webapi/e2e/v1/SipiV1R2RSpec.scala index aa251798aa..82db53644e 100644 --- a/webapi/src/it/scala/org/knora/webapi/e2e/v1/SipiV1R2RSpec.scala +++ b/webapi/src/it/scala/org/knora/webapi/e2e/v1/SipiV1R2RSpec.scala @@ -48,7 +48,7 @@ class SipiV1R2RSpec extends R2RSpec { /* we need to run our app with the mocked sipi implementation */ override type Environment = core.LayersTest.DefaultTestEnvironmentWithoutSipi - override lazy val effectLayers = core.LayersTest.defaultLayersTestWithMockedSipi(system) + override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer(Some(system)) object RequestParams { diff --git a/webapi/src/it/scala/org/knora/webapi/e2e/v2/ValuesV2R2RSpec.scala b/webapi/src/it/scala/org/knora/webapi/e2e/v2/ValuesV2R2RSpec.scala index a145daa5bb..9ce41fcc51 100644 --- a/webapi/src/it/scala/org/knora/webapi/e2e/v2/ValuesV2R2RSpec.scala +++ b/webapi/src/it/scala/org/knora/webapi/e2e/v2/ValuesV2R2RSpec.scala @@ -48,7 +48,7 @@ class ValuesV2R2RSpec extends R2RSpec { /* we need to run our app with the mocked sipi implementation */ override type Environment = core.LayersTest.DefaultTestEnvironmentWithoutSipi - override lazy val effectLayers = core.LayersTest.defaultLayersTestWithMockedSipi(system) + override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer(Some(system)) private val aThingPictureIri = "http://rdfh.ch/0001/a-thing-picture" diff --git a/webapi/src/it/scala/org/knora/webapi/responders/v1/ResourcesResponderV1Spec.scala b/webapi/src/it/scala/org/knora/webapi/responders/v1/ResourcesResponderV1Spec.scala index a62fb3d75e..e3798ffdb7 100644 --- a/webapi/src/it/scala/org/knora/webapi/responders/v1/ResourcesResponderV1Spec.scala +++ b/webapi/src/it/scala/org/knora/webapi/responders/v1/ResourcesResponderV1Spec.scala @@ -656,7 +656,7 @@ class ResourcesResponderV1Spec extends CoreSpec with ImplicitSender { /* we need to run our app with the mocked sipi implementation */ override type Environment = core.LayersTest.DefaultTestEnvironmentWithoutSipi - override lazy val effectLayers = core.LayersTest.defaultLayersTestWithMockedSipi + override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer() // The default timeout for receiving reply messages from actors. private val timeout = 60.seconds diff --git a/webapi/src/it/scala/org/knora/webapi/responders/v1/ValuesResponderV1Spec.scala b/webapi/src/it/scala/org/knora/webapi/responders/v1/ValuesResponderV1Spec.scala index fbe3b56199..e25aa41510 100644 --- a/webapi/src/it/scala/org/knora/webapi/responders/v1/ValuesResponderV1Spec.scala +++ b/webapi/src/it/scala/org/knora/webapi/responders/v1/ValuesResponderV1Spec.scala @@ -54,7 +54,7 @@ class ValuesResponderV1Spec extends CoreSpec with ImplicitSender { /* we need to run our app with the mocked sipi implementation */ override type Environment = core.LayersTest.DefaultTestEnvironmentWithoutSipi - override lazy val effectLayers = core.LayersTest.defaultLayersTestWithMockedSipi + override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer() override lazy val rdfDataObjects = List( RdfDataObject( diff --git a/webapi/src/it/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala b/webapi/src/it/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala index 7d359938b9..ed792b08d0 100644 --- a/webapi/src/it/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala +++ b/webapi/src/it/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala @@ -402,7 +402,7 @@ class ResourcesResponderV2Spec extends CoreSpec with ImplicitSender { /* we need to run our app with the mocked sipi implementation */ override type Environment = core.LayersTest.DefaultTestEnvironmentWithoutSipi - override lazy val effectLayers = core.LayersTest.defaultLayersTestWithMockedSipi + override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer() override lazy val rdfDataObjects = List( RdfDataObject(path = "test_data/all_data/incunabula-data.ttl", name = "http://www.knora.org/data/0803/incunabula"), diff --git a/webapi/src/it/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala b/webapi/src/it/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala index b4bbe0b33f..142ab52fdd 100644 --- a/webapi/src/it/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala +++ b/webapi/src/it/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala @@ -61,7 +61,7 @@ class ValuesResponderV2Spec extends CoreSpec with ImplicitSender { /* we need to run our app with the mocked sipi implementation */ override type Environment = core.LayersTest.DefaultTestEnvironmentWithoutSipi - override lazy val effectLayers = core.LayersTest.defaultLayersTestWithMockedSipi + override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer() override lazy val rdfDataObjects = List( RdfDataObject( From 21b904426cfe6cd033d4e28033bb8c5140ea5a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinbo=CC=88lting?= Date: Fri, 16 Dec 2022 15:27:18 +0100 Subject: [PATCH 9/9] fix compile --- webapi/src/it/scala/org/knora/webapi/CoreSpec.scala | 2 +- webapi/src/it/scala/org/knora/webapi/E2ESpec.scala | 2 +- webapi/src/it/scala/org/knora/webapi/R2RSpec.scala | 2 +- .../src/it/scala/org/knora/webapi/e2e/v1/SipiV1R2RSpec.scala | 2 +- .../it/scala/org/knora/webapi/e2e/v2/ValuesV2R2RSpec.scala | 2 +- .../webapi/responders/v1/ResourcesResponderV1Spec.scala | 5 ++--- .../knora/webapi/responders/v1/ValuesResponderV1Spec.scala | 2 +- .../webapi/responders/v2/ResourcesResponderV2Spec.scala | 2 +- .../knora/webapi/responders/v2/ValuesResponderV2Spec.scala | 2 +- 9 files changed, 10 insertions(+), 11 deletions(-) diff --git a/webapi/src/it/scala/org/knora/webapi/CoreSpec.scala b/webapi/src/it/scala/org/knora/webapi/CoreSpec.scala index 6e2b324e95..8c9d6c67f3 100644 --- a/webapi/src/it/scala/org/knora/webapi/CoreSpec.scala +++ b/webapi/src/it/scala/org/knora/webapi/CoreSpec.scala @@ -43,7 +43,7 @@ abstract class CoreSpec * The effect layers from which the App is built. * Can be overriden in specs that need other implementations. */ - lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer() + lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainers() /** * `Bootstrap` will ensure that everything is instantiated when the Runtime is created diff --git a/webapi/src/it/scala/org/knora/webapi/E2ESpec.scala b/webapi/src/it/scala/org/knora/webapi/E2ESpec.scala index f0d2000132..a076f851bf 100644 --- a/webapi/src/it/scala/org/knora/webapi/E2ESpec.scala +++ b/webapi/src/it/scala/org/knora/webapi/E2ESpec.scala @@ -67,7 +67,7 @@ abstract class E2ESpec * The effect layers from which the App is built. * Can be overriden in specs that need other implementations. */ - lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer() + lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainers() /** * `Bootstrap` will ensure that everything is instantiated when the Runtime is created diff --git a/webapi/src/it/scala/org/knora/webapi/R2RSpec.scala b/webapi/src/it/scala/org/knora/webapi/R2RSpec.scala index 501e24705b..a7a7875020 100644 --- a/webapi/src/it/scala/org/knora/webapi/R2RSpec.scala +++ b/webapi/src/it/scala/org/knora/webapi/R2RSpec.scala @@ -50,7 +50,7 @@ abstract class R2RSpec * The effect layers from which the App is built. * Can be overriden in specs that need other implementations. */ - lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer(Some(system)) + lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainers(Some(system)) /** * `Bootstrap` will ensure that everything is instantiated when the Runtime is created diff --git a/webapi/src/it/scala/org/knora/webapi/e2e/v1/SipiV1R2RSpec.scala b/webapi/src/it/scala/org/knora/webapi/e2e/v1/SipiV1R2RSpec.scala index 82db53644e..0f39809538 100644 --- a/webapi/src/it/scala/org/knora/webapi/e2e/v1/SipiV1R2RSpec.scala +++ b/webapi/src/it/scala/org/knora/webapi/e2e/v1/SipiV1R2RSpec.scala @@ -48,7 +48,7 @@ class SipiV1R2RSpec extends R2RSpec { /* we need to run our app with the mocked sipi implementation */ override type Environment = core.LayersTest.DefaultTestEnvironmentWithoutSipi - override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer(Some(system)) + override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainers(Some(system)) object RequestParams { diff --git a/webapi/src/it/scala/org/knora/webapi/e2e/v2/ValuesV2R2RSpec.scala b/webapi/src/it/scala/org/knora/webapi/e2e/v2/ValuesV2R2RSpec.scala index 9ce41fcc51..5814fe7658 100644 --- a/webapi/src/it/scala/org/knora/webapi/e2e/v2/ValuesV2R2RSpec.scala +++ b/webapi/src/it/scala/org/knora/webapi/e2e/v2/ValuesV2R2RSpec.scala @@ -48,7 +48,7 @@ class ValuesV2R2RSpec extends R2RSpec { /* we need to run our app with the mocked sipi implementation */ override type Environment = core.LayersTest.DefaultTestEnvironmentWithoutSipi - override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer(Some(system)) + override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainers(Some(system)) private val aThingPictureIri = "http://rdfh.ch/0001/a-thing-picture" diff --git a/webapi/src/it/scala/org/knora/webapi/responders/v1/ResourcesResponderV1Spec.scala b/webapi/src/it/scala/org/knora/webapi/responders/v1/ResourcesResponderV1Spec.scala index e3798ffdb7..afecb55b86 100644 --- a/webapi/src/it/scala/org/knora/webapi/responders/v1/ResourcesResponderV1Spec.scala +++ b/webapi/src/it/scala/org/knora/webapi/responders/v1/ResourcesResponderV1Spec.scala @@ -7,13 +7,12 @@ package org.knora.webapi.responders.v1 import akka.testkit.ImplicitSender import spray.json.JsValue - import java.util.UUID import scala.concurrent.duration._ - import dsp.errors.BadRequestException import dsp.errors.NotFoundException import dsp.errors.OntologyConstraintException + import org.knora.webapi._ import org.knora.webapi.messages.IriConversions._ import org.knora.webapi.messages.OntologyConstants @@ -656,7 +655,7 @@ class ResourcesResponderV1Spec extends CoreSpec with ImplicitSender { /* we need to run our app with the mocked sipi implementation */ override type Environment = core.LayersTest.DefaultTestEnvironmentWithoutSipi - override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer() + override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainers() // The default timeout for receiving reply messages from actors. private val timeout = 60.seconds diff --git a/webapi/src/it/scala/org/knora/webapi/responders/v1/ValuesResponderV1Spec.scala b/webapi/src/it/scala/org/knora/webapi/responders/v1/ValuesResponderV1Spec.scala index e25aa41510..39a08af807 100644 --- a/webapi/src/it/scala/org/knora/webapi/responders/v1/ValuesResponderV1Spec.scala +++ b/webapi/src/it/scala/org/knora/webapi/responders/v1/ValuesResponderV1Spec.scala @@ -54,7 +54,7 @@ class ValuesResponderV1Spec extends CoreSpec with ImplicitSender { /* we need to run our app with the mocked sipi implementation */ override type Environment = core.LayersTest.DefaultTestEnvironmentWithoutSipi - override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer() + override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainers() override lazy val rdfDataObjects = List( RdfDataObject( diff --git a/webapi/src/it/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala b/webapi/src/it/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala index ed792b08d0..00557f2250 100644 --- a/webapi/src/it/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala +++ b/webapi/src/it/scala/org/knora/webapi/responders/v2/ResourcesResponderV2Spec.scala @@ -402,7 +402,7 @@ class ResourcesResponderV2Spec extends CoreSpec with ImplicitSender { /* we need to run our app with the mocked sipi implementation */ override type Environment = core.LayersTest.DefaultTestEnvironmentWithoutSipi - override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer() + override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainers() override lazy val rdfDataObjects = List( RdfDataObject(path = "test_data/all_data/incunabula-data.ttl", name = "http://www.knora.org/data/0803/incunabula"), diff --git a/webapi/src/it/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala b/webapi/src/it/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala index 142ab52fdd..f0f34f3477 100644 --- a/webapi/src/it/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala +++ b/webapi/src/it/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala @@ -61,7 +61,7 @@ class ValuesResponderV2Spec extends CoreSpec with ImplicitSender { /* we need to run our app with the mocked sipi implementation */ override type Environment = core.LayersTest.DefaultTestEnvironmentWithoutSipi - override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainer() + override lazy val effectLayers = core.LayersTest.integrationTestsWithFusekiTestcontainers() override lazy val rdfDataObjects = List( RdfDataObject(