From df6b8f1652e5a587d058b9bb03d5ab30bc523d15 Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Thu, 7 Mar 2024 15:22:11 +0100 Subject: [PATCH] Use separate solr core for migrator tests --- .../io/renku/solr/client/migration/SolrMigratorSpec.scala | 1 + nix/dev-scripts.nix | 2 ++ project/SolrServer.scala | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/solr-client/src/test/scala/io/renku/solr/client/migration/SolrMigratorSpec.scala b/modules/solr-client/src/test/scala/io/renku/solr/client/migration/SolrMigratorSpec.scala index bf96c3fb..b7459a01 100644 --- a/modules/solr-client/src/test/scala/io/renku/solr/client/migration/SolrMigratorSpec.scala +++ b/modules/solr-client/src/test/scala/io/renku/solr/client/migration/SolrMigratorSpec.scala @@ -27,6 +27,7 @@ import munit.CatsEffectSuite class SolrMigratorSpec extends CatsEffectSuite with SolrSpec with SolrTruncate: private val logger = scribe.cats.io + protected override lazy val coreName: String = server.testCoreName3 private val migrations = Seq( SchemaMigration(-5, Add(FieldType.text(TypeName("testText"), Analyzer.classic))), SchemaMigration(-4, Add(FieldType.int(TypeName("testInt")))), diff --git a/nix/dev-scripts.nix b/nix/dev-scripts.nix index 51433c50..9fedaec4 100644 --- a/nix/dev-scripts.nix +++ b/nix/dev-scripts.nix @@ -77,9 +77,11 @@ solr-recreate-dbtests-cores = writeShellScriptBin "solr-recreate-dbtests-cores" '' solr-delete-core core-test1 solr-delete-core core-test2 + solr-delete-core core-test3 solr-delete-core search-core-test solr-create-core core-test1 solr-create-core core-test2 + solr-create-core core-test3 solr-create-core search-core-test ''; diff --git a/project/SolrServer.scala b/project/SolrServer.scala index d8c67509..2335fea8 100644 --- a/project/SolrServer.scala +++ b/project/SolrServer.scala @@ -40,7 +40,8 @@ class SolrServer(module: String, port: Int) { val searchCoreName = "search-core-test" val testCoreName1 = "core-test1" val testCoreName2 = "core-test2" - private val cores = Set(testCoreName1, testCoreName2, searchCoreName) + val testCoreName3 = "core-test3" + private val cores = Set(testCoreName1, testCoreName2, testCoreName3, searchCoreName) private val startCmd = s"""|docker run --rm |--name $containerName |-p $port:8983