Issue #13595 has been updated by Chris Price.

Good times.  I just realized that the existing puppetlabs_spec_helper was 
created by Ken about 4 months ago, to reduce spec utility code duplication 
between facter specs and puppet specs.  However, facter is one of our external 
projects that does *not* have a dependency on puppet core; thus, introducing 
the puppet spec state management code into puppetlabs_spec_helper.rb would 
break facter tests.

At the moment, I'm leaning towards adding a second file to the same repo... 
probably called "puppet_spec_helper.rb" or "puppet_core_spec_helper.rb".  This 
way, facter will still be able to have a dependency on the *project* 
(puppetlabs_spec_helper), but it can simply choose not to 'require' the 
puppet-core-specific spec_helper, and thus avoid having a dependency on puppet 
core.

I'm not thrilled with this idea / approach, but it seems more sane than 
introducing *yet another* repository to contain this new spec helper...
----------------------------------------
Bug #13595: initialize_everything_for_tests couples modules to specific Puppet 
versions
https://projects.puppetlabs.com/issues/13595#change-59902

Author: Eric Shamow
Status: Accepted
Priority: Urgent
Assignee: Chris Price
Category: testing
Target version: 2.7.x
Affected Puppet version: 
Keywords: 
Branch: 


Ran into this while attempting to run spec tests on the puppetlabs-ntp module 
from Git:

    Failure/Error: Unable to find matching line from backtrace
    NoMethodError:
    undefined method `initialize_everything_for_tests' for 
#<Puppet::Util::Settings:0xb71fb30c>

It turns out that :initialize_everything_for_tests was recently added to Puppet 
itself:

https://github.com/puppetlabs/puppet/commit/56c55d54474d97958f0f21e715237cf3f2117668

There are two problems here:

1) We have no current documentation or method of knowing which version of 
Puppet is required for a particular module.  We tie to specific module versions 
but not to Puppet itself - anyone trying to test the latest puppetlabs-ntp 
against the most recently cut version of Puppet or PE will fail.

2) We should be iterating on modules much more quickly than we are on core, but 
this means that modules need to be slightly more backward-compatible - we can't 
rely on the "latest and greatest" stuff in master or 2.7.x if modules are going 
to be updated frequently.  It might make more sense to move this type of 
function out to stdlib.

Commenting out the lines calling this function in the spec_helper.rb make the 
problem go away, but I suspect we're going to run into a lot more of these if 
we don't figure out an approach to it.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to