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

@ -46,7 +46,7 @@ trait Fixtures extends HttpClientOps { self: CatsEffectSuite =>
}
object Fixtures {
private val loggerIO: Logger[IO] = docspell.logging.getLogger[IO]
private val loggerIO: Logger[IO] = Logger.simpleDefault[IO]()
final case class Env(store: Store[IO], cfg: PubSubConfig) {
def pubSub: Resource[IO, NaivePubSub[IO]] = {

View File

@ -9,6 +9,7 @@ package docspell.pubsub.naive
import cats.effect._
import docspell.common._
import docspell.logging.Logger
import docspell.pubsub.api._
import io.circe.Encoder
@ -55,5 +56,5 @@ trait HttpClientOps {
}
object HttpClientOps {
private val logger = docspell.logging.getLogger[IO]
private val logger = Logger.simpleDefault[IO]()
}

View File

@ -12,13 +12,14 @@ import cats.effect._
import cats.implicits._
import fs2.concurrent.SignallingRef
import docspell.logging.{Logger, TestLoggingConfig}
import docspell.pubsub.api._
import docspell.pubsub.naive.Topics._
import munit.CatsEffectSuite
class NaivePubSubTest extends CatsEffectSuite with Fixtures {
private[this] val logger = docspell.logging.getLogger[IO]
class NaivePubSubTest extends CatsEffectSuite with Fixtures with TestLoggingConfig {
private[this] val logger = Logger.simpleDefault[IO]()
def subscribe[A](ps: PubSubT[IO], topic: TypedTopic[A]) =
for {