llowder@oreillyauto.com
2012-Jul-18 21:35 UTC
[Puppet Users] rspec-puppet and puppet doc conflicts
I recently started trying to use rspec-puppet and puppetlabs-rspec-helper. When I ran ''rspec-puppet-init'' in one o fmy modules, it created a series of symlinks. Now, when I run puppet doc (via a rake task supplied by The Foreman, but also when I call it directly) I get the following error: Could not generate documentation: Definition ''mongodb::addmongouser'' is already defined at /etc/puppet/environments/test/modules/mongodb/spec/fixtures/modules/mongodb/manifests/addmongouser.pp:36; cannot be redefined at /etc/puppet/environments/test/modules/mongodb/manifests/addmongouser.pp:36 Failed to process puppetdocs for /var/www/test while executing puppetdoc --output /var/www/test --modulepath /etc/puppet/environments/test/modules:/etc/puppet/modules -m rdoc What''s the best way to handle this, w/o having to constantly have to delete and recreate the symlinks created by rspec-puppet ? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/U74JKlKaqfcJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Mark Roggenkamp
2012-Jul-19 12:26 UTC
[Puppet Users] Re: rspec-puppet and puppet doc conflicts
Perhaps make your puppet doc rake task depend on the spec_clean task? It seems like you may not need the symlinks created by rspec-puppet-init as a dynamic fixture environment is created via .fixtures.yml. Mark On Wednesday, July 18, 2012 5:35:44 PM UTC-4, llo...@oreillyauto.com wrote:> > I recently started trying to use rspec-puppet and puppetlabs-rspec-helper. > > When I ran ''rspec-puppet-init'' in one o fmy modules, it created a series > of symlinks. > > Now, when I run puppet doc (via a rake task supplied by The Foreman, but > also when I call it directly) I get the following error: > > Could not generate documentation: Definition ''mongodb::addmongouser'' is > already defined at > /etc/puppet/environments/test/modules/mongodb/spec/fixtures/modules/mongodb/manifests/addmongouser.pp:36; > cannot be redefined at > /etc/puppet/environments/test/modules/mongodb/manifests/addmongouser.pp:36 > Failed to process puppetdocs for /var/www/test while executing puppetdoc > --output /var/www/test --modulepath > /etc/puppet/environments/test/modules:/etc/puppet/modules -m rdoc > > What''s the best way to handle this, w/o having to constantly have to > delete and recreate the symlinks created by rspec-puppet ? >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/QyMdr4P-wKEJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nan Liu
2012-Jul-19 16:55 UTC
Re: [Puppet Users] Re: rspec-puppet and puppet doc conflicts
On Thu, Jul 19, 2012 at 5:26 AM, Mark Roggenkamp <mark.roggenkamp@gmail.com> wrote:> Perhaps make your puppet doc rake task depend on the spec_clean task? It > seems like you may not need the symlinks created by rspec-puppet-init as a > dynamic fixture environment is created via .fixtures.yml.Yep, in general rake spec should clean up everything in the fixtures directory after the spec test unless there''s a failure, and Rake::Task[:spec_clean] will clean up the fixtures directory. If you find a Puppet Labs module with cruft in spec/fixtures/modules directory, please file a bug. Thanks, Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.