coder / coder/coder-desktop-windows

Avoid configuring DI for ILogger<T> in tests

Abierto
#99 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C#
Estrellas
26
Forks
12
Merge medio
6 h 50 min
PR fusionados (30 d)
1

Descripción

In some test code we are creating a host application builder and instantiating serilog to do app logging.

https://github.com/coder/coder-desktop-windows/blob/a6f7bb67bb111628d3de1f46d7b404d4bab67717/App/Services/MutagenController.cs#L160-L162

We should probably just write an implementation for `ILogger` and `ILogger` that log to the test output. It can use serilog under the hood if that makes it easier.

IDK where we'd put it, though. Maybe we should add add a `Test.Utils` project or something

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start by inspecting the test host setup and App/Services/MutagenController.cs around lines 160-162, where Serilog and dependency injection are configured for logging. Trace the affected tests and determine how their output is captured; the work is done when they can use a test logger without configuring a host application builder or Serilog instance.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp
Área
testing
Tipo de issue
Refactorización
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.