voxpupuli / puppet-network

Types and providers to manage network interfaces
https://forge.puppet.com/puppet/network
Apache License 2.0
66 stars 108 forks source link

Use Facter 3 if available for some facts #200

Closed rski closed 7 years ago

rski commented 7 years ago

Primary interface and primary IP can be found from Facter 3 facts, so use those if Facter 3 is available.

rski commented 7 years ago

I'm trying to figure out why the tests fail on ruby 1.9 and I can't. Looking here, https://travis-ci.org/rski/puppet-network/jobs/179865424 it seems that the mock of the version call is ignored. In the more recent versions it works and my ruby knowledge is not that intricate to tell why this happens.

rski commented 7 years ago

Hm one way to solve this would probably be to reverse the condition and switch the if with unless

rski commented 7 years ago

coverage fails because some codepaths are not triggered anymore in tests with facter 3 and so they are not tested, which is pretty much the point of this pr

igalic commented 7 years ago

i would be merging this despite coveralls drop.

alexjfisher commented 7 years ago

@igalic Maybe we could configure the coveralls setting COVERAGE DECREASE THRESHOLD FOR FAILURE? Or have it never fail the build but leave comments instead?

rski commented 7 years ago

if you're ok with merging it, I'm ok too I guess