Coder Social home page Coder Social logo

docker-policy-chefspec's Introduction

Summary

When using the following versions, Chef converges work fine but ChefSpec raises an exception originating in CompatResource.

  • Chef 12.7.2
  • ChefSpec from git (occurs on both 20711f0 and a1d32fa)
  • ChefDK 0.11.0
  • chef-cookbooks/docker cookbook 2.5.6
  • compat_resource cookbook/gem 12.7.3
  • kitchen-vagrant 0.19.0
  • TestKitchen 1.5.0

Stacktrace

The following stacktrace occurs for me on my local machine:

$ chef exec bundle exec rspec

[...]
Randomized with seed 10300
F

Failures:

  1) docker-policy-chefspec::default When all attributes are default, on an unspecified platform converges successfully
     Failure/Error: expect { chef_run }.to_not raise_error

       expected no Exception, got #<RuntimeError: Already loaded ChefCompat from files/lib/compat_resource/gemspec.rb. Cannot load a second time from /Users/shane/.chefdk/gem/ruby/2.1.0/gems/compat_resource-12.7.3/files/lib/compat_resource/gemspec.rb> with backtrace:
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/compat_resource-12.7.3/files/lib/compat_resource/gemspec.rb:2:in `<top (required)>'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/compat_resource-12.7.3/files/lib/compat_resource.rb:4:in `require'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/compat_resource-12.7.3/files/lib/compat_resource.rb:4:in `<top (required)>'
         # /var/folders/jm/_vq2xl_97fvb21y4f7kdppgc0000gn/T/d20160225-72328-1c0o3r5/cookbooks/compat_resource/libraries/autoload.rb:19:in `require'
         # /var/folders/jm/_vq2xl_97fvb21y4f7kdppgc0000gn/T/d20160225-72328-1c0o3r5/cookbooks/compat_resource/libraries/autoload.rb:19:in `<top (required)>'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:191:in `load'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:191:in `block in load_libraries_from_cookbook'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:188:in `each'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:188:in `load_libraries_from_cookbook'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:99:in `block in compile_libraries'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:98:in `each'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:98:in `compile_libraries'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:71:in `compile'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/chef-12.7.2/lib/chef/run_context.rb:167:in `load'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/chef-12.7.2/lib/chef/policy_builder/expand_node_object.rb:93:in `setup_run_context'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/gems/chef-12.7.2/lib/chef/client.rb:509:in `setup_run_context'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/bundler/gems/chefspec-20711f04fa95/lib/chefspec/solo_runner.rb:117:in `converge'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/bundler/gems/chefspec-20711f04fa95/lib/chefspec/server_runner.rb:60:in `converge'
         # ./spec/unit/recipes/default_spec.rb:13:in `block (3 levels) in <top (required)>'
         # ./spec/unit/recipes/default_spec.rb:17:in `block (4 levels) in <top (required)>'
         # /Users/shane/.chefdk/gem/ruby/2.1.0/bundler/gems/chefspec-20711f04fa95/lib/chefspec/expect_exception.rb:15:in `matches?'
         # ./spec/unit/recipes/default_spec.rb:17:in `block (3 levels) in <top (required)>'
     # ./spec/unit/recipes/default_spec.rb:17:in `block (3 levels) in <top (required)>'

Finished in 5.3 seconds (files took 0.83345 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/unit/recipes/default_spec.rb:16 # docker-policy-chefspec::default When all attributes are default, on an unspecified platform converges successfully

Randomized with seed 10300
[...]

docker-policy-chefspec's People

Contributors

shanesveller avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.