summaryrefslogtreecommitdiff
path: root/spec/unit/client_spec.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2015-09-29 14:46:28 -0700
committerThom May <thom@chef.io>2015-09-29 15:13:09 -0700
commit53380ccb30465f003ddc2fb3461007c135110577 (patch)
treef435d2da42949bcbfbaf2c586faf76b22e0f4166 /spec/unit/client_spec.rb
parentbc82c3e8603f6908d80fc29beb1d0902563398e7 (diff)
downloadchef-53380ccb30465f003ddc2fb3461007c135110577.tar.gz
Ensure that our list of recipes is backwards compattm/duplicate_recipes
Prior to chef 12.2 we included unexpanded 'cookbook' names for default recipes. In 12.2, we moved to expanded ('cookbook::default') names, which broke some searches. However, some of our users have now moved to searching for expanded, so we need to cater for both. Fixes #3767
Diffstat (limited to 'spec/unit/client_spec.rb')
-rw-r--r--spec/unit/client_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb
index f736c38859..8fbf56844e 100644
--- a/spec/unit/client_spec.rb
+++ b/spec/unit/client_spec.rb
@@ -375,7 +375,8 @@ describe Chef::Client do
expect(node[:roles].length).to eq(1)
expect(node[:roles]).to include("role_containing_cookbook1")
expect(node[:recipes]).not_to be_nil
- expect(node[:recipes].length).to eq(1)
+ expect(node[:recipes].length).to eq(2)
+ expect(node[:recipes]).to include("cookbook1")
expect(node[:recipes]).to include("cookbook1::default")
expect(node[:expanded_run_list]).not_to be_nil
expect(node[:expanded_run_list].length).to eq(1)