Re: [Puppet Users] rspec - Unable to find class ::logstash

2014-06-05 Thread Wolf Noble
Hi Brian, I've found having my spec test print out a catalog is a good way to build out a suite of tests context 'when the do_stuff param has the value of hell_yeah' do let (:facts) {{'osfamily' = 'RainbowOS }} let (:params) {{'do_stuff' = 'hell_yeah'}} It 'print a catalog for spec

Re: [Puppet Users] rspec - Unable to find class ::logstash

2014-06-05 Thread Felix Frank
On 06/04/2014 11:04 PM, Johan De Wit wrote: And that is what you should check in your rspec file. In your manifests, you need indeed the scoping, in your spec, you don't Humm, unfortunate. Doesn't that (in theory) open you up for regressions in the form of does no longer include the

Re: [Puppet Users] rspec - Unable to find class ::logstash

2014-06-05 Thread Johan De Wit
On 05/06/14 11:56, Felix Frank wrote: On 06/04/2014 11:04 PM, Johan De Wit wrote: And that is what you should check in your rspec file. In your manifests, you need indeed the scoping, in your spec, you don't Humm, unfortunate. Doesn't that (in theory) open you up for regressions in the form

[Puppet Users] rspec - Unable to find class ::logstash

2014-06-04 Thread Brian Wilkins
I am trying to write unit tests of my puppet modules. In my profiles::logstash::install, I disambiguate the call to /etc/puppet/modules/logstash by using ::logstash in my class definition like so: class profiles::logstash::install() { $ensure = $profiles::logstash::enable ? {true = present,

Re: [Puppet Users] rspec - Unable to find class ::logstash

2014-06-04 Thread Garrett Honeycutt
On 6/4/14, 2:30 PM, Brian Wilkins wrote: I am trying to write unit tests of my puppet modules. In my profiles::logstash::install, I disambiguate the call to /etc/puppet/modules/logstash by using ::logstash in my class definition like so: class profiles::logstash::install() { $ensure =

Re: [Puppet Users] rspec - Unable to find class ::logstash

2014-06-04 Thread Brian Wilkins
I think you missed the part where it is complaining about line 10 in my profiles::logstash::install module class { '::logstash': Removing ::logstash from the spec file has the same complaint. Brian On Wednesday, June 4, 2014 3:11:14 PM UTC-4, Garrett Honeycutt wrote: On 6/4/14, 2:30 PM,

Re: [Puppet Users] rspec - Unable to find class ::logstash

2014-06-04 Thread Garrett Honeycutt
On 6/4/14, 3:13 PM, Brian Wilkins wrote: I think you missed the part where it is complaining about line 10 in my profiles::logstash::install module class { '::logstash': Removing ::logstash from the spec file has the same complaint. Brian On Wednesday, June 4, 2014 3:11:14 PM UTC-4,

Re: [Puppet Users] rspec - Unable to find class ::logstash

2014-06-04 Thread Brian Wilkins
It is needed to disambiguate from profiles::logstash and just logstash classes. If I remove it, then it will complain that logstash is already loaded when it tries to load profiles::logstash. On Wednesday, June 4, 2014 3:52:01 PM UTC-4, Garrett Honeycutt wrote: On 6/4/14, 3:13 PM, Brian

Re: [Puppet Users] rspec - Unable to find class ::logstash

2014-06-04 Thread Johan De Wit
Hi, the scoping of the class is indeed needed, but i believe that is a parser issue. I did the test wit class { '::vim': version = '7.4' } on my master with puppet master --compile certname i got following : { metadata: { api_version: 1 }, data: { classes: [ settings,

Re: [Puppet Users] rspec - Unable to find class ::logstash

2014-06-04 Thread Brian Wilkins
Thanks Johan. It turns out that I had to set my path's explicitly in my spec_helper.rb. For some reason, the automatically created spec_helper.rb created by rspec-puppet-init did not create a usuable file. My tests are running successfully now. Brian On Wednesday, June 4, 2014 5:05:05 PM