teemtee / tmt

Test Management Tool
MIT License
76 stars 112 forks source link

Prepare and/or build custom container images for testing of container plugin #2893

Open happz opened 2 weeks ago

happz commented 2 weeks ago

Tests performing PROVISION_HOW=container use a wide array of containers, both official ones and custom ones as well. The goal of this ticket is to level the playfield and make the situation more predictable, especially when it comes to various requirements tmt has.

Collect a list of images to test against. The list would start with well-known official images - fedora:rawhide, centos:stream9, etc. Then, based on recent discussions and issues, we will need to add images that:

We would have a set of Container files, to prepare our "test" images, and run podman build for all of them from a make target. It is expected that, in the case of recent distros like rawhide, the actual changes made to the image would be minimal. Eventually, we would end up with the whole set of "test" images, some very close to the original, upstream ones, some enhanced e.g. with the non-privileged account and sudo configuration.

tmt tests would then use these images only: there would be no guessing in a test whether registry.fedoraproject.org/fedora:latest or quay.io/fedora:latest should be used, because the only allowed would be localhost/tmt/fedora/rawhide:latest, for example. We would use the same battery of tests in functional tests and in unit tests, for provisioning or package manager testing, and so on.