--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.
On Wed, Jun 26, 2013 at 7:23 PM, Amos Shapira <amos.s...@gmail.com> wrote:
I'm writing my first puppet function rspec test and am having a problem which I don't see how to solve.The function (and the test) involve access to files through the File Server. In order for the function (and the test) to work I need to pass "--fileserverconf=fileserver.conf" parameter to Puppet.So far I haven't found a way to do that.If I understand the rspec-puppet source at https://github.com/rodjek/rspec-puppet/blob/master/lib/rspec-puppet.rb correctly then the list of parameters I can pass is limited to the ones mentioned in lines 16-22. Am I right?
Does anyone know how can I pass other parameters, or otherwise affect Puppet's configuration to set this value?
Oddly enough, you can't depend on rspec-puppet to configure the settings for spec test. For example, puppetlab's spec helper configures the modulepath [1] to include spec/fixtures/modules, but this does not seem to configure Puppet[:modulepath] setting. For whatever reason, puppet loads the modules correctly from spec/fixtures/modules, but when you debug the spec test, it appears to set the module path to:(rdb:1) p Puppet[:modulepath]"/dev/null/modules:/usr/share/puppet/modules"
You can do what Wolf suggested. File server conf is somewhat inconsistent, since the setting is actually: Puppet[:fileserverconfig].HTH,Nan
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.
In puppetlabs_spec_helper/puppet_spec_helper[1] which was based on a file in Puppet[2] the confdir and vardir are explicitly set to '/dev/null' which causes the modulepath you're seeing in Puppet "proper".
I believe, however the subject catalog/function that is tested in each example group (unless you explicitly create a subject yourself) should mask that value with what ever is passed into RSpec.configure (like the modulepath setting in module_spec_helper) for its compilation/initialization[3][4].
--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/ynVp988yEcU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.