dotnet / dotnet-docker

Docker images for .NET and the .NET Tools.
https://hub.docker.com/_/microsoft-dotnet
MIT License
4.44k stars 1.93k forks source link

Use manifest.json to determine which tests to run. #5337

Open lbussell opened 6 months ago

lbussell commented 6 months ago

Describe the Problem

Maintaining TestData.cs causes merge conflicts during servicing and allows for human error. Most of this data is already duplicated in some way by the manifest.json file. We should consider using that file to drive our tests.

Describe the Solution

There is already a model for the manifest in the ImageBuilder tool. We could either duplicate that model, create a simpler model in this repo just for reading the manifest, or factor out the model from ImageBuilder and publish it as a package.

Including a model to read the manifest file in this repo would also help with https://github.com/dotnet/dotnet-docker/issues/4704.

Additional Context

lbussell commented 5 months ago

[Triage]

  1. We discussed generating the TestData in the Test project, but decided against it since it might be easy to miss special cases that exist in the manifest if the test cases aren't explicitly enumerated.

It would be a good idea to create a prototype of this, probably by creating a simple model in the Test project.