image-builder icon indicating copy to clipboard operation
image-builder copied to clipboard

test: Simplify testing

Open croissanne opened this issue 3 years ago • 2 comments

Currently we test 4 different scenarios against osbuild-composer. However composer tests these scenarios already. Let's make CI as fast and reliable as possible while maintaining the same level of coverage.

Move as much as possible away from schutzbot and to github workflows. At the end we should just be validating the requests image-builder produces for composer.

These requests can be validated against composer's openapi spec as a start. But we should have additional checks for any additional information that image-builder adds before sending it to composer (correct repositories for instance). Note that with composerv2 the cloud/upload options will change quite a bit, so it's unclear if image-builder will add any cloud platform info in future other than for Azure.

Implementation-wise we could just write a mock server which checks requests against composer's api spec and does the additional checks.

Let's keep the quickest full rhel image-build (aws) as a sanity check, at least initially.

croissanne avatar Sep 06 '21 14:09 croissanne

Also we need to check that the returned HTTP codes are the one we expect

lavocatt avatar Sep 07 '21 08:09 lavocatt

CC myself so I don't forget. I've got some initial analysis on the topic but never managed to complete it.

atodorov avatar Sep 09 '21 10:09 atodorov