kisoku / chef-accumulator

LWRP for accumulating resources
6 stars 8 forks source link

Does not work with chef 13.0.118 #4

Open horazont opened 7 years ago

horazont commented 7 years ago

Running kitchen test default-ubuntu-1204 fails with the following chef error:

================================================================================
Error executing action `create` on resource 'accumulator[accumulator_test_1]'
================================================================================

NameError
---------
uninitialized constant Chef::Resource::AccumulatorTestFoo

Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/accumulator_test/recipes/default.rb:42:in `block (2 levels) in from_file'
/tmp/kitchen/cache/cookbooks/accumulator/libraries/provider_accumulator.rb:48:in `action_create'

Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/accumulator_test/recipes/default.rb

 40: accumulator "accumulator_test_1" do
 41:   target :template => "/tmp/accumulator_test_target_1"
 42:   filter {|res| res.is_a? Chef::Resource::AccumulatorTestFoo }
 43:   transform {|resources|
 44:     lines = []
 45:     resources.each do |r|
 46:       lines.push("#{r.name} #{r.arg}")
 47:     end
 48:     lines
 49:   }
 50: end

Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/accumulator_test/recipes/default.rb:40:in `from_file'

accumulator("accumulator_test_1") do
  provider Chef::Provider::Accumulator
  action :create
  default_guard_interpreter :default
  declared_type :accumulator
  cookbook_name "accumulator_test"
  recipe_name "default"
  target {:template=>"/tmp/accumulator_test_target_1"}
  filter #<Proc:0x000000035a0fc0@/tmp/kitchen/cache/cookbooks/accumulator_test/recipes/default.rb:42>
  transform #<Proc:0x000000035a0a48@/tmp/kitchen/cache/cookbooks/accumulator_test/recipes/default.rb:43>
end

System Info:
------------
chef_version=13.0.118
platform=ubuntu
platform_version=12.04
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
program_name=chef-solo worker: ppid=1902;start=07:50:25;
executable=/opt/chef/bin/chef-solo
balazsadam commented 6 years ago

+1