Refactor #17354
closed
Test for idempotent operating system creation in Puppet fact parser
Added by Dominic Cleal about 8 years ago.
Updated over 6 years ago.
Description
There are small idempotency issues in the Puppet fact parser, leading to bugs such as #17335, where the OS is successfully created on the first run, but subsequent runs fail as the parser tried to recreate an existing OS.
The tests should be expanded to call importer.operatingsystem twice and to verify the OS is unchanged.
- Related to Bug #17335: puppet_fact_parser.rb does not correctly add hosts facts whos minor number does not exist or is empty added
Other small issues found while expanding these tests:
- On the first run, the OS is an instance of Operatingsystem with the
family
attribute set on save by set_family
, but subsequent runs return an STI subclass. The first run should also return the STI subclass.
- Some newer OSes are missing the refactoring from #3962, causing #class to return Operatingsystem
- The fact parser modifies OS release facts in the incoming hash through #gsub!
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4026 added
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Translation missing: en.field_release set to 189
Also available in: Atom
PDF