rodjek / rspec-puppet

RSpec tests for your Puppet manifests
http://rspec-puppet.com
MIT License
364 stars 203 forks source link

Strict variable setup is failing #373

Closed rnelson0 closed 8 years ago

rnelson0 commented 8 years ago

In rspec-puppet 2.3.2, or from git up to commit 6bbedd2, rspec with strict variables seems to work fine. However, moving past that to commit 5a54c7e results in new errors showing up.

$ cat ./spec/classes/zabbix__agent_spec.rb
require 'spec_helper'
describe 'profile::zabbix::agent', :type => :class do
  let :facts do
    {
      :id => 'root',
      :kernel => 'Linux',
      :osfamily => 'RedHat',
      :operatingsystem => 'RedHat',
      :operatingsystemrelease => '7.2',
      :operatingsystemmajrelease => '7',
      :concat_basedir => '/dne',
      :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
      :puppetversion => '4.3.1',
    }
  end

  context 'with defaults for all parameters' do
    it { is_expected.to create_class('profile::zabbix::agent') }
    it { is_expected.to contain_class('zabbix::agent') }
    it { is_expected.to contain_selboolean('zabbix_can_network').with_value('on') }
    it { is_expected.to contain_firewall('100 zabbix-client') }
  end
end
$ be rspec spec/classes/zabbix__agent_spec.rb
<PATH>/puppet/controlrepo/dist/profile/spec/spec_helper.rb:12:in `block in <top (required)>': [DEPRECATION] ::[] is deprecated. Use ::new instead.

profile::zabbix::agent
  with defaults for all parameters
    should contain Class[profile::zabbix::agent] (FAILED - 1)
    should contain Class[zabbix::agent] (FAILED - 2)
    should contain Selboolean[zabbix_can_network] with value => "on" (FAILED - 3)
    should contain Firewall[100 zabbix-client] (FAILED - 4)

Failures:

  1) profile::zabbix::agent with defaults for all parameters should contain Class[profile::zabbix::agent]
     Failure/Error: it { is_expected.to create_class('profile::zabbix::agent') }
     Puppet::PreformattedError:
       Evaluation Error: Unknown variable: '::is_pe'. at <PATH>puppet/controlrepo/dist/profile/spec/fixtures/modules/zabbix/manifests/params.pp:293:15 on node chi-build04.mss.local
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/runtime3_support.rb:37:in `optionally_fail'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/runtime3_support.rb:19:in `fail'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/runtime3_support.rb:89:in `get_variable_value'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:935:in `eval_VariableExpression'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:67:in `visit_this_1'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:73:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:1151:in `block in unfold'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:1146:in `each'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:1146:in `unfold'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:820:in `eval_CallNamedFunctionExpression'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:67:in `visit_this_1'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:73:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:898:in `block in eval_IfExpression'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:1132:in `with_guarded_scope'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:897:in `eval_IfExpression'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:46:in `block in visit_this'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:42:in `each'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:42:in `visit_this'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:69:in `visit_this_1'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:73:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:573:in `block in eval_BlockExpression'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:573:in `each'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:573:in `eval_BlockExpression'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:67:in `visit_this_1'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:73:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/parser/evaluating_parser.rb:57:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/ast/pops_bridge.rb:32:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/ast.rb:31:in `safeevaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/resource/type.rb:185:in `evaluate_code'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/resource.rb:84:in `block in evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler.rb:51:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/resource.rb:76:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/resource/type.rb:484:in `evaluate_parent_type'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/resource/type.rb:163:in `evaluate_code'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/resource.rb:84:in `block in evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler.rb:51:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/resource.rb:76:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/compiler.rb:401:in `each'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/compiler.rb:401:in `evaluate_classes'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/functions/include.rb:33:in `block in <top (required)>'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/functions.rb:162:in `block (2 levels) in newfunction'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler.rb:51:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/functions.rb:155:in `block in newfunction'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/runtime3_support.rb:290:in `call_function'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:840:in `call_function_with_block'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:820:in `eval_CallNamedFunctionExpression'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:67:in `visit_this_1'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:73:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:573:in `block in eval_BlockExpression'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:573:in `each'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:573:in `eval_BlockExpression'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:46:in `block in visit_this'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:42:in `each'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:42:in `visit_this'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:69:in `visit_this_1'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:73:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/parser/evaluating_parser.rb:57:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/ast/pops_bridge.rb:32:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/ast.rb:31:in `safeevaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/resource/type.rb:185:in `evaluate_code'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/resource.rb:84:in `block in evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler.rb:51:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/resource.rb:76:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/compiler.rb:401:in `each'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/compiler.rb:401:in `evaluate_classes'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/functions/include.rb:33:in `block in <top (required)>'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/functions.rb:162:in `block (2 levels) in newfunction'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler.rb:51:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/functions.rb:155:in `block in newfunction'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/runtime3_support.rb:290:in `call_function'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:840:in `call_function_with_block'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:820:in `eval_CallNamedFunctionExpression'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:46:in `block in visit_this'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:42:in `each'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:42:in `visit_this'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:69:in `visit_this_1'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:73:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:644:in `eval_Program'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:46:in `block in visit_this'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:42:in `each'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:42:in `visit_this'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/visitor.rb:69:in `visit_this_1'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/evaluator/evaluator_impl.rb:73:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/pops/parser/evaluating_parser.rb:57:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/ast/pops_bridge.rb:111:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/ast.rb:31:in `safeevaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/resource/type.rb:185:in `evaluate_code'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/resource.rb:84:in `block in evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler.rb:51:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/resource.rb:76:in `evaluate'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/compiler.rb:638:in `evaluate_main'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/compiler.rb:180:in `block (2 levels) in compile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler.rb:51:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/compiler.rb:180:in `block in compile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/context.rb:65:in `override'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet.rb:240:in `override'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/compiler.rb:168:in `compile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/parser/compiler.rb:36:in `compile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/indirector/catalog/compiler.rb:93:in `block (2 levels) in compile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util/profiler.rb:51:in `profile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/indirector/catalog/compiler.rb:91:in `block in compile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util.rb:129:in `block in benchmark'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/util.rb:128:in `benchmark'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/indirector/catalog/compiler.rb:90:in `compile'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/indirector/catalog/compiler.rb:50:in `find'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/gems/puppet-4.3.2/lib/puppet/indirector/indirection.rb:194:in `find'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/bundler/gems/rspec-puppet-5a54c7e05e4e/lib/rspec-puppet/adapters.rb:70:in `catalog'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/bundler/gems/rspec-puppet-5a54c7e05e4e/lib/rspec-puppet/adapters.rb:143:in `catalog'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/bundler/gems/rspec-puppet-5a54c7e05e4e/lib/rspec-puppet/support.rb:169:in `build_catalog_without_cache'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/bundler/gems/rspec-puppet-5a54c7e05e4e/lib/rspec-puppet/support.rb:178:in `block in build_catalog'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/bundler/gems/rspec-puppet-5a54c7e05e4e/lib/rspec-puppet/cache.rb:17:in `call'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/bundler/gems/rspec-puppet-5a54c7e05e4e/lib/rspec-puppet/cache.rb:17:in `get'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/bundler/gems/rspec-puppet-5a54c7e05e4e/lib/rspec-puppet/support.rb:177:in `build_catalog'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/bundler/gems/rspec-puppet-5a54c7e05e4e/lib/rspec-puppet/support.rb:30:in `load_catalogue'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/bundler/gems/rspec-puppet-5a54c7e05e4e/lib/rspec-puppet/example/class_example_group.rb:7:in `catalogue'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/bundler/gems/rspec-puppet-5a54c7e05e4e/lib/rspec-puppet/support.rb:10:in `block in subject'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/bundler/gems/rspec-puppet-5a54c7e05e4e/lib/rspec-puppet/matchers/create_generic.rb:82:in `call'
     # <PATH>puppet/controlrepo/vendor/ruby/1.9.1/bundler/gems/rspec-puppet-5a54c7e05e4e/lib/rspec-puppet/matchers/create_generic.rb:82:in `matches?'
     # ./spec/classes/zabbix__agent_spec.rb:18:in `block (3 levels) in <top (required)>'

As I can resolve this immediately by changing my Gemfile to use the older commit or to pull from rubygems, I believe this is a regression in commit 5a54c7e.

rnelson0 commented 8 years ago

This is an issue with gem 2.4.0 now that it is released. I can either disable strict variables or pin to 2.3.2.

rnelson0 commented 8 years ago

This is still occurring. See https://gist.github.com/rnelson0/8ce6aae9ba105b0729efc739dc8c34e6 for detailed reproduction steps.

DavidS commented 8 years ago

@rnelson0 the test uses a fact that is not supplied in the facts of the agent_spec. This causes expected test failures under STRICT_VARIABLES. If tests passed before, assume that earlier rspec-puppet versions didn't setup the puppet configuration properly under STRICT_VARIABLES.

rnelson0 commented 8 years ago

@DavidS Ooof. That makes sense but that hurts.

DavidS commented 8 years ago

Yeah, quite a bummer that one. :-(

I'm still not sure how glad I am that we found it. But in the end, I think, honest tests win over short-term pain. Adding a few facts to test suites usually is not that much effort.