Re: [Puppet Users] Puppet 3.0 rspec and custom resources

Josh Cooper
Tue, 11 Dec 2012 02:11:20 -0000

I have a proposed fix in puppet, see my last comment
in http://projects.puppetlabs.com/issues/17543#note-3

Josh

On Wednesday, November 14, 2012 5:40:45 AM UTC-8, Brett Porter
wrote:
>
> I''ve seen the same problem - and a similar one when working with
multiple
> hosts. There''s some data and sample projects here:
> https://github.com/rodjek/rspec-puppet/issues/60
>
> On Tuesday, 6 November 2012 02:52:24 UTC+11, Nathan Huff wrote:
>>
>> So I dug into this a little more.  It has something to do with how
puppet
>> is loading the type definitions.
>> There appears to be some kind of cache that gets loaded with type
>> definitions when the first manifest gets processed.
>> If the first test that gets run is for a class that contains all the
>> types necessary for classes that get tested later everything runs fine.
>> If on the other hand if the first test run is for a class that
doesn''t
>> contain all the types used in later classes the later test fails.
>>
>> Given the example I posted
>> This works correctly.
>> rspec spec/classes/test_spec.rb spec/classes/test__c_spec.rb
>> This doesn''t
>> rspec spec/classes/test__c_spec.rb spec/classes/test_spec.rb
>>
>> Running them both separately works too.
>>
>> On Monday, October 29, 2012 2:48:25 PM UTC-5, Nathan Huff wrote:
>>>
>>> Looks like the subnamespace thing isn''t important either.
Just having
>>> two classes triggers this as well.
>>>
>>> On Monday, October 29, 2012 1:13:05 PM UTC-5, Nathan Huff wrote:
>>>>
>>>> OK so I have what I think is a minimal test case here:
>>>>
>>>> https://github.com/nhuff/spec-failure
>>>>
>>>> The readme has a list of gems I have installed in it.
>>>>
>>>> You seem to need spec tests for two classes, one of which is in
a sub
>>>> namespace of the other.
>>>> In this case ''test'' and
''test::c''.  With both spec files in place the
>>>> system complains about anchor not being defined.
>>>> If you remove the test file for test::c the test for class test
will
>>>> pass.
>>>>
>>>

--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit