Skip to content
代码片段 群组 项目
未验证 提交 8107aa5e 编辑于 作者: Doug Bunting's avatar Doug Bunting 提交者: GitHub
浏览文件

Cleanup logs after successful test runs (#40807)

- backport for #39038
- `cherry-pick` of 6958517c
- update `AssemblyTestLog` to perform actual log directory cleanup
  - add `ReportTestFailure()` method for tests to report failures, disabling cleanup
  - add `IAcceptFailureReports` for `AspNetTestAssemblyRunner` to report failures to `AssemblyTestLog`
- extend `AspNetTestAssemblyRunner` to optionally create fixture instances using `static ForAssembly(Assembly)`
- add `AssemblyTestLogFixtureAttribute` to register `AssemblyTestLog` as an assembly fixture
  - use `AssemblyTestLogFixtureAttribute` in all test projects
- disable log cleanup in three existing tests

- add tests of new cleanup features
  - also cover a few existing methods
- do cleanup before creating new logger
  - was deleting the just-created global.log file

nits:
- use `is [not] null` and `new()` more
- move `AssemblyTestLogTests` to same namespace as `AssemblyTestLog`
上级 eb694ab1
No related branches found
No related tags found
无相关合并请求
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册