Skip to content

Commit

Permalink
Use separate solr core for migrator tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eikek committed Mar 7, 2024
1 parent 2598aac commit df6b8f1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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")))),
Expand Down
2 changes: 2 additions & 0 deletions nix/dev-scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
'';

Expand Down
3 changes: 2 additions & 1 deletion project/SolrServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df6b8f1

Please sign in to comment.