Purpose of miq_product_feature_spec


#1

Hi,

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.

Ari


#2

@dclarizio @gtanzillo Please respond


#3

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.


#4

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


#5

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