Project

General

Profile

Refactor #17354

Test for idempotent operating system creation in Puppet fact parser

Added by Dominic Cleal over 2 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Tests
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

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 issues

Related to Foreman - Bug #17335: puppet_fact_parser.rb does not correctly add hosts facts whos minor number does not exist or is emptyClosed2016-11-15

Associated revisions

Revision 1285cc0d (diff)
Added by Dominic Cleal over 2 years ago

fixes #17354 - test and improve idempotency of OS fact parser

History

#1 Updated by Dominic Cleal over 2 years ago

  • Related to Bug #17335: puppet_fact_parser.rb does not correctly add hosts facts whos minor number does not exist or is empty added

#2 Updated by Dominic Cleal over 2 years ago

Other small issues found while expanding these tests:

  1. 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.
  2. Some newer OSes are missing the refactoring from #3962, causing #class to return Operatingsystem
  3. The fact parser modifies OS release facts in the incoming hash through #gsub!

#3 Updated by The Foreman Bot over 2 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4026 added

#4 Updated by Dominic Cleal over 2 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Dominic Cleal over 2 years ago

  • Legacy Backlogs Release (now unused) set to 189

Also available in: Atom PDF