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

@ -10,10 +10,11 @@ import cats.effect.IO
import cats.effect.unsafe.implicits.global
import docspell.files.TestFiles
import docspell.logging.TestLoggingConfig
import munit._
class TextExtractionSuite extends FunSuite {
class TextExtractionSuite extends FunSuite with TestLoggingConfig {
import TestFiles._
val logger = docspell.logging.getLogger[IO]

View File

@ -10,10 +10,11 @@ import cats.effect._
import cats.effect.unsafe.implicits.global
import docspell.files.ExampleFiles
import docspell.logging.TestLoggingConfig
import munit._
class OdfExtractTest extends FunSuite {
class OdfExtractTest extends FunSuite with TestLoggingConfig {
val files = List(
ExampleFiles.examples_sample_odt -> 6367,

View File

@ -6,9 +6,11 @@
package docspell.extract.pdfbox
import docspell.logging.TestLoggingConfig
import munit._
class PdfMetaDataTest extends FunSuite {
class PdfMetaDataTest extends FunSuite with TestLoggingConfig {
test("split keywords on comma") {
val md = PdfMetaData.empty.copy(keywords = Some("a,b, c"))

View File

@ -10,10 +10,11 @@ import cats.effect._
import cats.effect.unsafe.implicits.global
import docspell.files.{ExampleFiles, TestFiles}
import docspell.logging.TestLoggingConfig
import munit._
class PdfboxExtractTest extends FunSuite {
class PdfboxExtractTest extends FunSuite with TestLoggingConfig {
val textPDFs = List(
ExampleFiles.letter_de_pdf -> TestFiles.letterDEText,

View File

@ -13,10 +13,11 @@ import fs2.io.file.Files
import fs2.io.file.Path
import docspell.files.ExampleFiles
import docspell.logging.TestLoggingConfig
import munit._
class PdfboxPreviewTest extends FunSuite {
class PdfboxPreviewTest extends FunSuite with TestLoggingConfig {
val testPDFs = List(
ExampleFiles.letter_de_pdf -> "7d98be75b239816d6c751b3f3c56118ebf1a4632c43baf35a68a662f9d595ab8",

View File

@ -11,10 +11,11 @@ import cats.effect.unsafe.implicits.global
import docspell.common.MimeTypeHint
import docspell.files.ExampleFiles
import docspell.logging.TestLoggingConfig
import munit._
class PoiExtractTest extends FunSuite {
class PoiExtractTest extends FunSuite with TestLoggingConfig {
val officeFiles = List(
ExampleFiles.examples_sample_doc -> 6241,

View File

@ -7,10 +7,11 @@
package docspell.extract.rtf
import docspell.files.ExampleFiles
import docspell.logging.TestLoggingConfig
import munit._
class RtfExtractTest extends FunSuite {
class RtfExtractTest extends FunSuite with TestLoggingConfig {
test("extract text from rtf using java input-stream") {
val file = ExampleFiles.examples_sample_rtf