Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ProductFeatures#InitIfNeeded #907

Merged
merged 5 commits into from
Mar 13, 2019
Merged

Fix ProductFeatures#InitIfNeeded #907

merged 5 commits into from
Mar 13, 2019

Conversation

dgdavid
Copy link
Member

@dgdavid dgdavid commented Mar 12, 2019

Problem

Thanks to a change made in the licenses location (FATE#324053 / SLE-4173), we realized that the ProductFeatures#InitIfNeeded method is not working as expected, since it is not restoring the available features values in the running system.

This could be easily checked fixing by hand the wrong value for base_product_license_directory in the /etc/YaST2/ProductFeatures file in a SLE-115-SP1, changing it from /etc/YaST2/licenses/base to /usr/share/licenses/product/base and running the yast2-firstboot module: it skips the License agreement step.

Solution

Add tests and fix the method.


Related PR and discussions,

Copy link
Member

@lslezak lslezak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some notes to the test.

library/control/test/ProductFeatures_test.rb Outdated Show resolved Hide resolved
library/control/test/ProductFeatures_test.rb Outdated Show resolved Hide resolved
library/control/test/ProductFeatures_test.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@imobachgs imobachgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a pair of comments about the unit tests.

library/control/test/ProductFeatures_test.rb Outdated Show resolved Hide resolved
library/control/test/ProductFeatures_test.rb Outdated Show resolved Hide resolved
library/control/test/ProductFeatures_test.rb Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Mar 12, 2019

Coverage Status

Coverage increased (+0.03%) to 27.997% when pulling 55fda39 on fix-product-features into 1b33f0a on master.

Copy link
Member

@lslezak lslezak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@lslezak lslezak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM 😉

@dgdavid dgdavid merged commit b7d99b0 into master Mar 13, 2019
@dgdavid dgdavid deleted the fix-product-features branch March 13, 2019 09:17
@yast-bot
Copy link
Contributor

✔️ Public Jenkins job #89 successfully finished
✔️ Created OBS submit request #684633

@yast-bot
Copy link
Contributor

✔️ Internal Jenkins job #94 successfully finished
✔️ Created IBS submit request #186946

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants