Issue #4086 has been updated by Nick Lewis. Status changed from Accepted to Ready for Testing Branch set to http://github.com/nicklewis/puppet/tree/ticket/master/4086-fix_failing_tests_with_manifest
These were being caused by a method (TypeCollection::perform_initial_import) being called and doing a parse of the site.pp file. The behavior triggering this is sort of strange -- when a new resource type is made, it is added to the list of known resource types; if the list of known resource types doesn't yet exist, it is created, and perform_initial_import is called, which parses the site.pp. In any case, that method is now stubbed in the specs that were failing. ---------------------------------------- Bug #4086: Tests fail depending on if you have a manifests/site.pp http://projects.puppetlabs.com/issues/4086 Author: Matt Robinson Status: Ready for Testing Priority: Normal Assigned to: Category: testing Target version: 2.6 Affected version: 2.6alpha1 Keywords: Branch: http://github.com/nicklewis/puppet/tree/ticket/master/4086-fix_failing_tests_with_manifest Specifically, if I put something simple in my manifests/site.pp `file { '/tmp/foo': ensure => present, }` I get 7 test failures in spec/unit/dsl/resource_type_api_spec.rb `Puppet::Error in 'Puppet::DSL::ResourceTypeAPI should be able to create a hostclass' Could not parse for environment production: unexpected invocation: Puppet::Resource::Type.new(:hostclass, '', {:line => 4, :file => '/Users/matthewrobinson/.puppet/manifests/site.pp', :code => #<Puppet::Parser::AST::ASTArray:0x1032281d0>, :doc => ''}) satisfied expectations: - expected exactly once, already invoked once: Puppet::Resource::Type.new()` In general there's a class of test failure that happens where setup in the ~/.puppet or /etc/puppet directory cause the failures. I guess I'm not proposing we fix all those as part of this ticket, but more just writing this general case out as a reminder that these exist and that the way we fix this specific case may be something we want to remember when other failures of this type occur. -- 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.
