voxpupuli / rspec-puppet-facts

Simplify your unit tests by looping on every supported Operating System and populating facts.
Apache License 2.0
61 stars 53 forks source link

RFC: Add option to suppress legacy facts #143

Open alexjfisher opened 1 year ago

alexjfisher commented 1 year ago

By default legacy facts will be removed in Puppet 8. This change mimics that.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 70.00% and project coverage change: -7.44 :warning:

Comparison is base (0921dff) 94.93% compared to head (b777fbc) 87.50%.

:exclamation: Current head b777fbc differs from pull request most recent head e87a0de. Consider uploading reports for the commit e87a0de to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #143 +/- ## ========================================== - Coverage 94.93% 87.50% -7.44% ========================================== Files 2 3 +1 Lines 158 168 +10 ========================================== - Hits 150 147 -3 - Misses 8 21 +13 ``` | [Impacted Files](https://codecov.io/gh/voxpupuli/rspec-puppet-facts/pull/143?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=voxpupuli) | Coverage Δ | | |---|---|---| | [lib/rspec-puppet-facts/legacy\_facts.rb](https://codecov.io/gh/voxpupuli/rspec-puppet-facts/pull/143?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=voxpupuli#diff-bGliL3JzcGVjLXB1cHBldC1mYWN0cy9sZWdhY3lfZmFjdHMucmI=) | `62.50% <62.50%> (ø)` | | | [lib/rspec-puppet-facts.rb](https://codecov.io/gh/voxpupuli/rspec-puppet-facts/pull/143?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=voxpupuli#diff-bGliL3JzcGVjLXB1cHBldC1mYWN0cy5yYg==) | `91.61% <100.00%> (-6.43%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

bastelfreak commented 1 year ago

some rubocop autofix will help here, I'm fine with the general code.

alexjfisher commented 1 year ago

some rubocop autofix will help here, I'm fine with the general code.

I'm not though! ;)

Since rspec-puppet itself adds default legacy facts, I think the pruning has to take place there. Something like https://github.com/puppetlabs/rspec-puppet/pull/53