voxpupuli / onceover

Your gateway drug to automated infrastructure testing with Puppet
141 stars 45 forks source link

Can't test puppet 4 since 3.17.1 #279

Open alexjfisher opened 3 years ago

alexjfisher commented 3 years ago

I know Puppet 4 is EOL, but onceover is a great tool to help migrate to newer versions (and the gemspec says puppet 4 is still supported).

I think something in https://github.com/dylanratcliffe/onceover/pull/272 is the cause.

role::example: failed
  errors:
    superclass mismatch for class User
      factsets: solaris10

I can get a better error message by running rspec directly.

export PDK_PUPPET_VERSION=4
pdk bundle exec rspec .onceover/spec/classes/role__example_on_solaris10_spec.rb
Failures:

  1) role::example using fact set solaris10
     Failure/Error: class User < ADSIObject; end

     TypeError:
       superclass mismatch for class User
     # ./.onceover/spec/classes/role__example_on_solaris10_spec.rb:54:in `<module:ADSI>'
     # ./.onceover/spec/classes/role__example_on_solaris10_spec.rb:52:in `<module:Windows>'
     # ./.onceover/spec/classes/role__example_on_solaris10_spec.rb:51:in `rescue in block (3 levels) in <top (required)>'
     # ./.onceover/spec/classes/role__example_on_solaris10_spec.rb:44:in `block (3 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # LoadError:
     #   cannot load such file -- ffi
     #   /home/alex/.rvm/gems/ruby-2.1.9/gems/rspec-puppet-2.7.10/lib/rspec-puppet/monkey_patches.rb:360:in `require'
alexjfisher commented 3 years ago

FWIW, I also have to explicitly add --format OnceoverFormatter when running with Puppet 4/Ruby 2.1.9 or I don't get any output as to why the test failed.