voxpupuli / onceover

Your gateway drug to automated infrastructure testing with Puppet
Apache License 2.0
142 stars 45 forks source link

regular expressions dont work for modules downloaded by r10k #86

Open GeoffWilliams opened 7 years ago

GeoffWilliams commented 7 years ago

Overview

If you are using R10K to download modules (eg external roles and profiles). Then using any form of regular expression will fail to match any classes

Expected result

Regular expressions should match against all available modules

Actual result

Impossible to match a class downloaded with R10K, specifying the classname as a string works, however

Analysis

Onceover does not scan the modules it downloads for available classes (controlrepo.rb ~L150) this means they are unavailable for matching (class.rb ~L15)

Workarounds

GeoffWilliams commented 5 years ago

I have a partial fix for this but need to re-order the class scan to run after r10k processes puppetfile - working on this

dylanratcliffe commented 5 years ago

Yeah this is expected behaviour (Not desired though, it's only expected because of the order things happen in), happy to swap that order to allow for this, will accept PR

GeoffWilliams commented 5 years ago

thanks mate - tested this with customer today and it seems to work, although tests are failing for other (hiera) reasons :upside_down_face: