refactor: extract WebHostFixture + TestAuthPolicyProvider to shared lib
Yavsc.Blogs.Tests will need a fixture too. Lifting the cross-cutting plumbing (Kestrel + self-signed cert + address discovery + lazy init) into a new Yavsc.Tests.Shared project lets the next fixture inherit from it without copying 200+ lines of setup boilerplate, and keeps the Org.Tests fixture focused on its IdentityServer + SMTP seed. * New project src/Yavsc.Tests.Shared with WebHostFixture (abstract) and TestAuthPolicyProvider (test auth bypass via X-Test-Role). * WebServerFixture in Org.Tests now inherits from WebHostFixture; BuildApp + ConfigurePipelineAsync hold only Org-specific work. * Two shared package versions promoted to the root Directory.Packages.props. * Tests still 30/30 green.
This commit is contained in:
parent
20a6f22ec3
commit
349ddc03f5
12 changed files with 460 additions and 355 deletions
8
src/Yavsc.Tests.Shared/Directory.Packages.props
Normal file
8
src/Yavsc.Tests.Shared/Directory.Packages.props
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<Project>
|
||||
<!--
|
||||
Yavsc.Tests.Shared has no project-specific package versions.
|
||||
The shared library only needs the canonical Hosting / Mvc.Testing
|
||||
versions, all of which are declared at the repository root.
|
||||
-->
|
||||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Packages.props', '$(MSBuildThisFileDirectory)../'))" />
|
||||
</Project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue