dotnet-docker
dotnet-docker copied to clipboard
Refactor ImageScenarioVerifier test execution
When ImageScenarioVerifier was introduced, all .NET Docker images spanned all product repo types. It made sense for ImageScenarioVerifier to operate on multiple types of the same image family for tests. However, with the introduction of distroless, composite, and AOT images, this is no longer the case. Additionally, there are way too many conditions in the test execution to follow it logically. https://github.com/dotnet/dotnet-docker/blob/471d19856b2eff69ee88b2eb94db42f77ad16bf5/tests/Microsoft.DotNet.Docker.Tests/ImageScenarioVerifier.cs#L43-L117
We should also re-think the pattern of testing multiple images (sdk + runtime) per one ProductImageData, as described above not all image families span all image types.
An ideal solution would be easier to read and validate that the expected tests are running using the correct images.
[Triage] The continued addition of different variants and special cases has made it difficult to reason about what gets tested in the ImageScenarioVerifier
, so we should investigate this and come up with a proposal before investing in a complete solution.
[Triage] This was fixed in https://github.com/dotnet/dotnet-docker/pull/5083