coder / coder/coder-desktop-windows

Avoid configuring DI for ILogger<T> in tests

オープン
#99 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
26
フォーク
12
平均マージ
6時間 50分
マージ済み PR(30日)
1

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
testing
issue の種類
リファクタリング
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。