Purpose of miq_product_feature_spec


I noticed the test miq_product_feature_spec.rb and I’m trying to figure out the purpose of it.
It counts the features in miq_product_feature.yml?
why is it needed?
I noticed it because it frequently fails my patches with every change and often requires me to rebase.


@dclarizio @gtanzillo Please respond

Hi @zeari, The test verifies the seeding code that adds or updates system default data when the server starts up, is working properly. It checks that the expected number of features exist in the miq_product_features table regardless of how many times the seeding is run and whether or not there is existing data in the table.

I think the main question here is regarding the need of updating those counts manually every time.

@chessbyte @gtanzillo I slightly “optimized” the flow so there’s only one place to update instead of 3.
But it will be really great to have it completely automatic and not need to manually update it at all.