From 9c910d262e38f002d90b6d4f939688c4166985ad Mon Sep 17 00:00:00 2001 From: eikek <eike.kettner@posteo.de> Date: Tue, 28 May 2024 21:13:44 +0200 Subject: [PATCH] Update munit to 1.0.0, munit-cats-effect to 2.0.0 --- .../src/test/scala/docspell/addons/Fixtures.scala | 2 +- .../test/scala/docspell/common/util/DirectoryTest.scala | 2 +- modules/files/src/test/scala/docspell/files/ZipTest.scala | 2 +- .../src/test/scala/docspell/pubsub/naive/Fixtures.scala | 4 ++-- .../src/test/scala/docspell/store/DatabaseTest.scala | 2 +- .../src/test/scala/docspell/store/StoreFixture.scala | 4 ++-- project/Dependencies.scala | 8 ++++---- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/addonlib/src/test/scala/docspell/addons/Fixtures.scala b/modules/addonlib/src/test/scala/docspell/addons/Fixtures.scala index f169d3dd..558e1761 100644 --- a/modules/addonlib/src/test/scala/docspell/addons/Fixtures.scala +++ b/modules/addonlib/src/test/scala/docspell/addons/Fixtures.scala @@ -55,7 +55,7 @@ trait Fixtures extends TestLoggingConfig { self: CatsEffectSuite => Path(s"/tmp/target/test-temp") val tempDir = - ResourceFixture[Path]( + ResourceFunFixture[Path]( Resource.eval(Files[IO].createDirectories(baseTempDir)) *> Files[IO] .tempDirectory(baseTempDir.some, "run-", PosixPermissions.fromOctal("777")) diff --git a/modules/common/src/test/scala/docspell/common/util/DirectoryTest.scala b/modules/common/src/test/scala/docspell/common/util/DirectoryTest.scala index a760dcc1..7d1cf6d1 100644 --- a/modules/common/src/test/scala/docspell/common/util/DirectoryTest.scala +++ b/modules/common/src/test/scala/docspell/common/util/DirectoryTest.scala @@ -16,7 +16,7 @@ import munit.CatsEffectSuite class DirectoryTest extends CatsEffectSuite with TestLoggingConfig { val logger = docspell.logging.getLogger[IO] - val tempDir = ResourceFixture( + val tempDir = ResourceFunFixture( Files[IO].tempDirectory(Path("target").some, "directory-test-", None) ) diff --git a/modules/files/src/test/scala/docspell/files/ZipTest.scala b/modules/files/src/test/scala/docspell/files/ZipTest.scala index 45d86d0e..935fb69a 100644 --- a/modules/files/src/test/scala/docspell/files/ZipTest.scala +++ b/modules/files/src/test/scala/docspell/files/ZipTest.scala @@ -19,7 +19,7 @@ import munit._ class ZipTest extends CatsEffectSuite with TestLoggingConfig { val logger = docspell.logging.getLogger[IO] - val tempDir = ResourceFixture( + val tempDir = ResourceFunFixture( Files[IO].tempDirectory(Path("target").some, "zip-test-", None) ) diff --git a/modules/pubsub/naive/src/test/scala/docspell/pubsub/naive/Fixtures.scala b/modules/pubsub/naive/src/test/scala/docspell/pubsub/naive/Fixtures.scala index 848fc387..d472b1c5 100644 --- a/modules/pubsub/naive/src/test/scala/docspell/pubsub/naive/Fixtures.scala +++ b/modules/pubsub/naive/src/test/scala/docspell/pubsub/naive/Fixtures.scala @@ -20,9 +20,9 @@ import org.typelevel.ci._ trait Fixtures extends HttpClientOps { self: CatsEffectSuite => - val pubsubEnv = ResourceFixture(Fixtures.envResource("node-1")) + val pubsubEnv = ResourceFunFixture(Fixtures.envResource("node-1")) - val pubsubT = ResourceFixture { + val pubsubT = ResourceFunFixture { Fixtures .envResource("node-1") .flatMap(_.pubSub) diff --git a/modules/store/src/test/scala/docspell/store/DatabaseTest.scala b/modules/store/src/test/scala/docspell/store/DatabaseTest.scala index feaa994e..46cc0a25 100644 --- a/modules/store/src/test/scala/docspell/store/DatabaseTest.scala +++ b/modules/store/src/test/scala/docspell/store/DatabaseTest.scala @@ -66,7 +66,7 @@ trait DatabaseTest } yield res ) - lazy val newH2DataSource = ResourceFixture(for { + lazy val newH2DataSource = ResourceFunFixture(for { jdbc <- Resource.eval(IO(StoreFixture.memoryDB(UUID.randomUUID().toString))) ds <- StoreFixture.dataSource(jdbc) } yield (jdbc, ds)) diff --git a/modules/store/src/test/scala/docspell/store/StoreFixture.scala b/modules/store/src/test/scala/docspell/store/StoreFixture.scala index e95844aa..03fb9cb1 100644 --- a/modules/store/src/test/scala/docspell/store/StoreFixture.scala +++ b/modules/store/src/test/scala/docspell/store/StoreFixture.scala @@ -26,7 +26,7 @@ trait StoreFixture extends CatsEffectFunFixtures { self: CatsEffectSuite => def schemaMigrateConfig = StoreFixture.schemaMigrateConfig - val xa = ResourceFixture { + val xa = ResourceFunFixture { val cfg = StoreFixture.memoryDB("test") for { ds <- StoreFixture.dataSource(cfg) @@ -35,7 +35,7 @@ trait StoreFixture extends CatsEffectFunFixtures { self: CatsEffectSuite => } yield xa } - val store = ResourceFixture { + val store = ResourceFunFixture { val cfg = StoreFixture.memoryDB("test") for { store <- StoreFixture.store(cfg) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 414fa0ac..916f225d 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -33,8 +33,8 @@ object Dependencies { val Log4sVersion = "1.10.0" val LogbackVersion = "1.2.10" val MariaDbVersion = "3.4.0" - val MUnitVersion = "0.7.29" - val MUnitCatsEffectVersion = "1.0.7" + val MUnitVersion = "1.0.0" + val MUnitCatsEffectVersion = "2.0.0" val PdfboxVersion = "3.0.2" val PdfjsViewerVersion = "2.12.313" val PoiVersion = "4.1.2" @@ -49,7 +49,7 @@ object Dependencies { val TikaVersion = "2.9.2" val YamuscaVersion = "0.10.0" val SwaggerUIVersion = "5.17.11" - val TestContainerVersion = "0.40.14" + val TestContainerVersion = "0.41.3" val TwelveMonkeysVersion = "3.10.1" val JQueryVersion = "3.5.1" @@ -326,7 +326,7 @@ object Dependencies { val munit = Seq( "org.scalameta" %% "munit" % MUnitVersion, "org.scalameta" %% "munit-scalacheck" % MUnitVersion, - "org.typelevel" %% "munit-cats-effect-3" % MUnitCatsEffectVersion + "org.typelevel" %% "munit-cats-effect" % MUnitCatsEffectVersion ) val kindProjectorPlugin = "org.typelevel" %% "kind-projector" % KindProjectorVersion