Fix logging in tests

This commit is contained in:
eikek
2022-02-19 23:33:01 +01:00
parent 8b42708db2
commit 9eb9497675
28 changed files with 130 additions and 76 deletions

View File

@ -9,11 +9,12 @@ package docspell.store.migrate
import cats.effect.IO
import cats.effect.unsafe.implicits._
import docspell.logging.TestLoggingConfig
import docspell.store.StoreFixture
import munit.FunSuite
class H2MigrateTest extends FunSuite {
class H2MigrateTest extends FunSuite with TestLoggingConfig {
test("h2 empty schema migration") {
val jdbc = StoreFixture.memoryDB("h2test")

View File

@ -10,6 +10,7 @@ import cats.effect._
import cats.effect.unsafe.implicits._
import docspell.common.LenientUri
import docspell.logging.TestLoggingConfig
import docspell.store.JdbcConfig
import com.dimafeng.testcontainers.MariaDBContainer
@ -17,7 +18,10 @@ import com.dimafeng.testcontainers.munit.TestContainerForAll
import munit._
import org.testcontainers.utility.DockerImageName
class MariaDbMigrateTest extends FunSuite with TestContainerForAll {
class MariaDbMigrateTest
extends FunSuite
with TestContainerForAll
with TestLoggingConfig {
override val containerDef: MariaDBContainer.Def =
MariaDBContainer.Def(DockerImageName.parse("mariadb:10.5"))

View File

@ -10,6 +10,7 @@ import cats.effect._
import cats.effect.unsafe.implicits._
import docspell.common.LenientUri
import docspell.logging.TestLoggingConfig
import docspell.store.JdbcConfig
import com.dimafeng.testcontainers.PostgreSQLContainer
@ -17,7 +18,10 @@ import com.dimafeng.testcontainers.munit.TestContainerForAll
import munit._
import org.testcontainers.utility.DockerImageName
class PostgresqlMigrateTest extends FunSuite with TestContainerForAll {
class PostgresqlMigrateTest
extends FunSuite
with TestContainerForAll
with TestLoggingConfig {
override val containerDef: PostgreSQLContainer.Def =
PostgreSQLContainer.Def(DockerImageName.parse("postgres:13"))

View File

@ -6,12 +6,13 @@
package docspell.store.qb
import docspell.logging.TestLoggingConfig
import docspell.store.qb.DSL._
import docspell.store.qb.model._
import munit._
class QueryBuilderTest extends FunSuite {
class QueryBuilderTest extends FunSuite with TestLoggingConfig {
test("simple") {
val c = CourseRecord.as("c")

View File

@ -6,13 +6,14 @@
package docspell.store.qb.impl
import docspell.logging.TestLoggingConfig
import docspell.store.qb.DSL._
import docspell.store.qb._
import docspell.store.qb.model._
import munit._
class SelectBuilderTest extends FunSuite {
class SelectBuilderTest extends FunSuite with TestLoggingConfig {
test("basic fragment") {
val c = CourseRecord.as("c")

View File

@ -12,6 +12,7 @@ import java.util.concurrent.atomic.AtomicLong
import cats.implicits._
import docspell.common._
import docspell.logging.TestLoggingConfig
import docspell.store.StoreFixture
import docspell.store.records.RJob
import docspell.store.records.RJobGroupUse
@ -19,7 +20,7 @@ import docspell.store.records.RJobGroupUse
import doobie.implicits._
import munit._
class QJobTest extends CatsEffectSuite with StoreFixture {
class QJobTest extends CatsEffectSuite with StoreFixture with TestLoggingConfig {
private[this] val c = new AtomicLong(0)
private val worker = Ident.unsafe("joex1")