voxpupuli / facterdb

A Database of OS facts provided by Facter

Home Page:http://voxpupuli.org/facterdb/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overriding BSD architecture or missing OS entirely

yakatz opened this issue · comments

If an operating system version is specified, on_supported_os will force hardwaremodel to amd64:
https://github.com/mcanevet/rspec-puppet-facts/blob/e02496555b0a79c0c0434ed99557b7097c5771b4/lib/rspec-puppet-facts.rb#L58-L59

But, if a version isn't specified, it won't make this change:
https://github.com/mcanevet/rspec-puppet-facts/blob/e02496555b0a79c0c0434ed99557b7097c5771b4/lib/rspec-puppet-facts.rb#L89-L94

Is this by design? Is there a good workaround?

Besides that, if an entire operating system disappears from the tests, there is no warning because https://github.com/mcanevet/rspec-puppet-facts/blob/e02496555b0a79c0c0434ed99557b7097c5771b4/lib/rspec-puppet-facts.rb#L113 just moves on to the next item. Shouldn't there be some kind of error (just like if the overall factor version is wrong)?