voxpupuli / onceover

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

Onceover cannot use logger in a custom ruby function #254

Open findmyname666 opened 4 years ago

findmyname666 commented 4 years ago

Hi There,

I use logger inside custom ruby function and it seems that onceover doesn't like it. Ruby function contains:

        logger = Logger.new(STDOUT)
        logger.level = Logger::WARN

Onceover fails:

role::test: ? Error: Evaluation Error: Error while evaluating a Function Call, uninitialized constant Puppet::Pops::Loader::RubyFunctionInstantiator::Logger (file: /some_path/puppet_ng/.onceover/etc/puppetlabs/code/environments/production/modules/firewall/manifests/pre.pp, line: 32, column: 20) on node noname

Could you advise whether Is there any fix or workaround for it pls?

Thx BR