Issue #17543 has been updated by Dominic Cleal.
This sounds very similar to the problem I had in #16277, which meant libdir wasn't set up due to app defaults not being initialised. The [change I made](https://github.com/domcleal/puppet/commit/0d20e53) was similar to yours Josh, but I'd also added another method that would allow app defaults to be initialised very early, so I could load custom types in during the evaluation of the spec file itself - not just before each test. The problem I ran into then was the Puppet tests themselves which use TestHelper, since there were a ton of tests that assumed the app defaults hadn't been initialised. ---------------------------------------- Bug #17543: Puppet 3.0 rspec and custom resources no longer work https://projects.puppetlabs.com/issues/17543#change-78589 Author: Ashley Penney Status: Accepted Priority: Normal Assignee: eric sorenson Category: Target version: 3.1.0 Affected Puppet version: 3.0.0 Keywords: Branch: https://github.com/joshcooper/puppet/tree/ticket/master/17543-reinitialize_app_defaults Based on https://groups.google.com/forum/?fromgroups#!topic/puppet-users/l8jzYibbSL8 thread multiple users have reported they can no longer run their unit tests on modules. The problem lies in custom resources/functions, and can be easily tested with puppet 3.0 and puppetlabs-apt from github. When you run the tests you'll see failures along the lines of: Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type anchor at /home/nrhuff/repos/puppet-os/spec/fixtures/modules/os/manifests/init.pp:2 on node enyo.localhost One of the users suffering this problem dug in further as mentioned on the list and said: <cite> 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. </cite> -- 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.
