diff options
author | Tim Hinderliter <tim@opscode.com> | 2011-03-16 16:16:31 -0700 |
---|---|---|
committer | Tim Hinderliter <tim@opscode.com> | 2011-03-17 16:58:27 -0700 |
commit | 492f1e11c837934f3270211111c5ce276113eb88 (patch) | |
tree | 9cb25f9bbc82bb082334c2bbdc7f8c228af5c597 /features/data | |
parent | 834dc9836999874643c06d28bc104c782492f423 (diff) | |
download | chef-492f1e11c837934f3270211111c5ce276113eb88.tar.gz |
Fixed attributes precendence order broken by previous Client/RunContext/Node refactors.
Re-did fixture text in attribute_settings cuke to make debugging easier.
Fixed bug in Chef::Exceptions::CookbookVersionSelection::UnsatisfiableRunListItem#to_json
Refactored Node#expand! again, to not clear out default & override attributes; restored
Node#reset_defaults_and_overrides; factored out merging of expansion attributes to
Node#apply_expansion_attributes; Node#expand! now returns RunListException instead of
VersionedRunList
Fixed bug with passing of recipes to RunContext#load which was causing us to lose
version pinning information directly in the run_list. Added
VersionedRecipeList#with_version_constraints_strings, which returns and array of
strings like ["recipe@1.2.3", "recipe2@2.3.4"]
Moved checking of Chef::Config[:environment] to Client#build_node, out of Node#find_or_create
Diffstat (limited to 'features/data')
6 files changed, 8 insertions, 11 deletions
diff --git a/features/data/cookbooks/attribute_settings/attributes/default.rb b/features/data/cookbooks/attribute_settings/attributes/default.rb index 22b40329cf..735f7c82bf 100644 --- a/features/data/cookbooks/attribute_settings/attributes/default.rb +++ b/features/data/cookbooks/attribute_settings/attributes/default.rb @@ -1,2 +1,3 @@ -default[:attribute_priority_was] = 1 +default[:attribute_priority_was] = "came from recipe[attribute_settings] attributes" + diff --git a/features/data/cookbooks/attribute_settings/recipes/default_in_recipe.rb b/features/data/cookbooks/attribute_settings/recipes/default_in_recipe.rb index df4fe70f57..611f00fab9 100644 --- a/features/data/cookbooks/attribute_settings/recipes/default_in_recipe.rb +++ b/features/data/cookbooks/attribute_settings/recipes/default_in_recipe.rb @@ -17,7 +17,7 @@ # limitations under the License. # -node.default[:attribute_priority_was] = 3 +node.default[:attribute_priority_was] = "came from recipe[attribute_settings::default_in_recipe]" execute "echo #{node[:attribute_priority_was]} > #{node[:tmpdir]}/attribute_setting.txt" diff --git a/features/data/cookbooks/attribute_settings_normal/attributes/default.rb b/features/data/cookbooks/attribute_settings_normal/attributes/default.rb index 88d1e0f9e5..9a9fabd4ff 100644 --- a/features/data/cookbooks/attribute_settings_normal/attributes/default.rb +++ b/features/data/cookbooks/attribute_settings_normal/attributes/default.rb @@ -1,2 +1,2 @@ -normal[:attribute_priority_was] = 4 +normal[:attribute_priority_was] = "came from recipe[attribute_settings_normal] attributes" diff --git a/features/data/cookbooks/attribute_settings_normal/recipes/normal_in_recipe.rb b/features/data/cookbooks/attribute_settings_normal/recipes/normal_in_recipe.rb index a30df1f8c0..5badb699dc 100644 --- a/features/data/cookbooks/attribute_settings_normal/recipes/normal_in_recipe.rb +++ b/features/data/cookbooks/attribute_settings_normal/recipes/normal_in_recipe.rb @@ -17,7 +17,7 @@ # limitations under the License. # -node.normal[:attribute_priority_was] = 5 +node.normal[:attribute_priority_was] = "came from recipe[attribute_settings_normal::normal_in_recipe]" execute "echo #{node[:attribute_priority_was]} > #{node[:tmpdir]}/attribute_setting.txt" diff --git a/features/data/cookbooks/attribute_settings_override/attributes/default.rb b/features/data/cookbooks/attribute_settings_override/attributes/default.rb index fc7f0c4842..a0caa1b4b8 100644 --- a/features/data/cookbooks/attribute_settings_override/attributes/default.rb +++ b/features/data/cookbooks/attribute_settings_override/attributes/default.rb @@ -1,2 +1,2 @@ -override[:attribute_priority_was] = 6 +override[:attribute_priority_was] = "came from recipe[attribute_settings_override] override attributes" diff --git a/features/data/cookbooks/attribute_settings_override/recipes/override_in_recipe.rb b/features/data/cookbooks/attribute_settings_override/recipes/override_in_recipe.rb index cc944749f2..88a28dce0e 100644 --- a/features/data/cookbooks/attribute_settings_override/recipes/override_in_recipe.rb +++ b/features/data/cookbooks/attribute_settings_override/recipes/override_in_recipe.rb @@ -1,8 +1,4 @@ -# -# Cookbook Name:: attribute_settings -# Recipe:: default -# -# Copyright 2009, Opscode +# Copyright (c) 2009, 2011 Opscode, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,7 +13,7 @@ # limitations under the License. # -node.override[:attribute_priority_was] = 9 +node.override[:attribute_priority_was] = "came from recipe[attribute_settings_override::override_in_recipe]" execute "echo #{node[:attribute_priority_was]} > #{node[:tmpdir]}/attribute_setting.txt" |