Ask Your Question
0

Hiera is not a class (TypeError)

asked 2016-10-26 19:12:21 -0500

deric gravatar image

I'm trying to setup Beaker acceptance tests in a Docker container. Regardless of distribution all tests end up with this error:

lib/hiera/scope.rb:1:in `<top (required)>': Hiera is not a class (TypeError)
    from /home/travis/build/deric/puppet-accounts/vendor/bundle/ruby/2.3.0/gems/puppet-4.7.0/lib/puppet/indirector/hiera.rb:2:in `require'
    from /home/travis/build/deric/puppet-accounts/vendor/bundle/ruby/2.3.0/gems/puppet-4.7.0/lib/puppet/indirector/hiera.rb:2:in `<top (required)>'
    from /home/travis/build/deric/puppet-accounts/vendor/bundle/ruby/2.3.0/gems/puppet-4.7.0/lib/puppet/indirector/data_binding/hiera.rb:1:in `require'
    from /home/travis/build/deric/puppet-accounts/vendor/bundle/ruby/2.3.0/gems/puppet-4.7.0/lib/puppet/indirector/data_binding/hiera.rb:1:in `<top (required)>'
    from /home/travis/build/deric/puppet-accounts/vendor/bundle/ruby/2.3.0/gems/puppet-4.7.0/lib/puppet/test/test_helper.rb:1:in `require'
    from /home/travis/build/deric/puppet-accounts/vendor/bundle/ruby/2.3.0/gems/puppet-4.7.0/lib/puppet/test/test_helper.rb:1:in `<top (required)>'
    from /home/travis/build/deric/puppet-accounts/vendor/bundle/ruby/2.3.0/gems/rspec-puppet-2.3.2/lib/rspec-puppet.rb:12:in `require'
    from /home/travis/build/deric/puppet-accounts/vendor/bundle/ruby/2.3.0/gems/rspec-puppet-2.3.2/lib/rspec-puppet.rb:12:in `<top (required)>'

here's full log

Any idea what that error means?

edit retag flag offensive close merge delete

Comments

I had similar errors when i had hiera data issues with yaml files.

Kevin T gravatar imageKevin T ( 2016-11-03 04:57:15 -0500 )edit

I've tried validating all YAML in the project (by loading YAML with Ruby parser). No errors showed up. Any other ideas? Same issue on Debian 8 and CentOS 7. Is it hiera issue or some other package?

deric gravatar imagederic ( 2016-11-16 03:15:08 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-11-17 07:23:10 -0500

deric gravatar image

The problem seems to be connected to auto-generated Rake tasks, instead of running

rake beaker:debian-8

seems to be better to run more complicated, but at least working task

BEAKER_set=debian-8 bundle exec rake acceptance

which filters other rspec tests (not acceptance ones):

RSpec::Core::RakeTask.new(:acceptance) do |t|
  t.pattern = 'spec/acceptance/*_spec.rb'
end
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-10-26 19:12:21 -0500

Seen: 87 times

Last updated: Nov 17 '16