Clean up test code after new .NET 10 AOT image approach
- Dominant language
- Dockerfile
- Stars
- 4.9k
- Forks
- 2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 26
Description
After the following changes, there is lots of test code that can be cleaned up/reorganized.
- https://github.com/dotnet/dotnet-docker/discussions/6312
- https://github.com/dotnet/dotnet-docker/pull/6352
- https://github.com/dotnet/dotnet-docker/pull/6358
Here's a quick summary of what I could see.
AOT test data is based on runtime-deps images. It should be based on the SDK images instead now.
https://github.com/dotnet/dotnet-docker/blob/bffebfd7c236ad2ed58e40ed8a155e936dd0c15c/tests/Microsoft.DotNet.Docker.Tests/TestData.cs#L229-L232
The AOT test scenarios should be moved to the SDK tests class:
https://github.com/dotnet/dotnet-docker/blob/bffebfd7c236ad2ed58e40ed8a155e936dd0c15c/tests/Microsoft.DotNet.Docker.Tests/RuntimeDepsImageTests.cs#L61-L75
`ProductImageData.SdkImageVariant` is no longer necessary (its purpose can be covered by just the regular `ImageVariant` property):
https://github.com/dotnet/dotnet-docker/blob/bffebfd7c236ad2ed58e40ed8a155e936dd0c15c/tests/Microsoft.DotNet.Docker.Tests/ProductImageData.cs#L34-L35
This workaround can be removed:
https://github.com/dotnet/dotnet-docker/blob/bffebfd7c236ad2ed58e40ed8a155e936dd0c15c/tests/Microsoft.DotNet.Docker.Tests/TestDataTests.cs#L53-L66
All runtime deps AOT special cases can be removed:
https://github.com/dotnet/dotnet-docker/blob/bffebfd7c236ad2ed58e40ed8a155e936dd0c15c/tests/Microsoft.DotNet.Docker.Tests/RuntimeDepsImageTests.cs#L49-L54
https://github.com/dotnet/dotnet-docker/blob/bffebfd7c236ad2ed58e40ed8a155e936dd0c15c/tests/Microsoft.DotNet.Docker.Tests/RuntimeDepsImageTests.cs#L26-L27
Contributor guide
Assessment
This issue has not been assessed yet.