cekit / cekit

CEKit - Container Evolution Kit
https://cekit.io/
MIT License
103 stars 39 forks source link

rhpam tests too sensitive to template changes #890

Open jmtd opened 7 months ago

jmtd commented 7 months ago

tests/test_integ_builder_osbs.py::test_osbs_builder_with_rhpam_1: the test has an entire rendered Dockerfile embedded in it and checks for it byte-for-byte identical! This is going to break for any change we make to the template. I think that test (and any more like it) need refactoring to limit their comparisons to the topic of the test.

Originally posted by @jmtd in https://github.com/cekit/cekit/issues/888#issuecomment-1934430943

rnc commented 7 months ago

I'm pasting this here from 888 :

I think at the time I did that to make sure the multistage was accurately building what the users wanted. While fiddly it was meant to catch mistakes in the generation.

IMHO there are arguments for and against - it does accurately catch unexpected changes but equally can be laborious to maintain and alter.