-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
DocsThis issue tracks updating documentationThis issue tracks updating documentationarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-minimal-hostingfeature-mvc-testingMVC testing packageMVC testing packagenet8_docathonThis issue is part of the documentation push in Fall 2023.This issue is part of the documentation push in Fall 2023.
Milestone
Description
Describe the bug
Using .net 6 minimal APIs and WebApplicationFactory for testing, the test config override is only applied after .Build.
This means any interaction with config while configuring services using builder.Configuration
will be using the app configuration, not test overrides.
To Reproduce
I've created a repo that shows the difference, here is the Program, and an Example test.
Further technical details
- ASP.NET Core version: net6.0
kristofferjalen, Blackleones, aayjaychan, AarthibalaK-mcd, przemekwojcik and 59 moregiovanialtelinomikocot
Metadata
Metadata
Assignees
Labels
DocsThis issue tracks updating documentationThis issue tracks updating documentationarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-minimal-hostingfeature-mvc-testingMVC testing packageMVC testing packagenet8_docathonThis issue is part of the documentation push in Fall 2023.This issue is part of the documentation push in Fall 2023.