You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was researching an issue I'm getting in tests (undefined method new_resource' for ConsulCookbook::Resource::ConsulConfigV0), so I wanted to look at the tests in the repo to find a good example for them. And I see that [all tests are disabled](https://github.com/sous-chefs/consul/pull/564) since Jun 2, 2020`. Do you plan to enable them back?
👻 Brief Description
No tests in the repo
🥞 Cookbook version
latest
👩🍳 Chef-Infra Version
14.7.17
🎩 Platform details
Steps To Reproduce
Run tests
🚓 Expected behavior
100% covered and builds are green :)
➕ Additional context
Maybe someone also could help me to understand why I get the undefined method new_resource'from all tests inchefdk:3.5.13? It used to work in chefdk:3.0.36`. 🥺
The receipt is as minimal as possible:
config=consul_config('consul')do |r|
end
The test looks like this:
require'spec_helper'describe'consul_agent::default'docached(:chef_run)doChefSpec::SoloRunner.newdo |node|
node.normal['languages']={'python'=>{'version'=>'2.7.1'}}end.converge(described_recipe)endit'ensures it will boot as an agent'doexpect(chef_run.node['consul']['config']['server']).toeq(false)endend
It fails with:
1) consul_agent::default ensures it will boot as an agent
Failure/Error:
ChefSpec::SoloRunner.new do |node|
node.normal['languages'] = { 'python' => { 'version' => '2.7.1' } }
end.converge(described_recipe)
NoMethodError:
undefined method `new_resource' for ConsulCookbook::Resource::ConsulConfigV0
# /tmp/d20211001-196-1l6bw5/cookbooks/poise/files/halite_gem/poise/helpers/lwrp_polyfill.rb:34:in `initialize'
# /tmp/d20211001-196-1l6bw5/cookbooks/poise/files/halite_gem/poise/helpers/resource_name.rb:32:in `initialize'
# /tmp/d20211001-196-1l6bw5/cookbooks/consul_agent/recipes/install.rb:38:in `from_file'
# /tmp/d20211001-196-1l6bw5/cookbooks/consul_agent/recipes/default.rb:7:in `from_file'
# ./spec/unit/recipes/ba_consul_agent_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/unit/recipes/ba_consul_agent_spec.rb:23:in `block (2 levels) in <top (required)>'
Appreciate any help!
The text was updated successfully, but these errors were encountered:
🗣️ Foreword
I was researching an issue I'm getting in tests (
undefined method
new_resource' for ConsulCookbook::Resource::ConsulConfigV0), so I wanted to look at the tests in the repo to find a good example for them. And I see that [all tests are disabled](https://github.com/sous-chefs/consul/pull/564) since
Jun 2, 2020`. Do you plan to enable them back?👻 Brief Description
No tests in the repo
🥞 Cookbook version
latest
👩🍳 Chef-Infra Version
14.7.17
🎩 Platform details
Steps To Reproduce
Run tests
🚓 Expected behavior
100% covered and builds are green :)
➕ Additional context
Maybe someone also could help me to understand why I get the
undefined method
new_resource'from all tests in
chefdk:3.5.13? It used to work in
chefdk:3.0.36`. 🥺The receipt is as minimal as possible:
The test looks like this:
It fails with:
Appreciate any help!
The text was updated successfully, but these errors were encountered: