diff options
author | Adam Jacob <adam@opscode.com> | 2010-04-16 07:27:38 -0700 |
---|---|---|
committer | Adam Jacob <adam@opscode.com> | 2010-04-16 07:27:38 -0700 |
commit | 8c8947b6d0f047882bee65782a59f119aa58423a (patch) | |
tree | ac41657b25818cb434e6d00daa24b08a5d690122 /features/chef-client/attribute_settings.feature | |
parent | 782320c6198f12e04f2b49a0808a732513107023 (diff) | |
download | chef-8c8947b6d0f047882bee65782a59f119aa58423a.tar.gz |
Adding CHEF-838 features
* Nodes should no longer be expanded on retrieval
* The grid in CHEF-838 is now a feature test
Diffstat (limited to 'features/chef-client/attribute_settings.feature')
-rw-r--r-- | features/chef-client/attribute_settings.feature | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/features/chef-client/attribute_settings.feature b/features/chef-client/attribute_settings.feature new file mode 100644 index 0000000000..6e32655c3b --- /dev/null +++ b/features/chef-client/attribute_settings.feature @@ -0,0 +1,102 @@ +@client @attribute_settings + +Feature: Set default, normal, and override attributes + In order to easily configure similar systems + As an Administrator + I want to use different kinds of attributes + + Scenario: Set a default attribute in a cookbook attribute file + Given a validated node + And it includes the recipe 'attribute_settings' + When I run the chef-client + Then the run should exit '0' + Then a file named 'attribute_setting.txt' should contain '1' + When the node is retrieved from the API + Then the inflated responses key 'attribute_priority_was' should be the integer '1' + + Scenario: Set the default attribute in a role + Given a 'role' named 'attribute_settings_default' exists + And a validated node + And it includes the role 'attribute_settings_default' + When I run the chef-client + Then the run should exit '0' + And a file named 'attribute_setting.txt' should contain '2' + When the node is retrieved from the API + Then the inflated responses key 'attribute_priority_was' should be the integer '2' + + Scenario: Set the default attribute in a recipe + Given a 'role' named 'attribute_settings_default' exists + And a validated node + And it includes the role 'attribute_settings_default' + And it includes the recipe 'attribute_settings::default_in_recipe' + When I run the chef-client + Then the run should exit '0' + And a file named 'attribute_setting.txt' should contain '3' + When the node is retrieved from the API + Then the inflated responses key 'attribute_priority_was' should be the integer '3' + + Scenario: Set a normal attribute in a cookbook attribute file + Given a validated node + And it includes the role 'attribute_settings_default' + And it includes the recipe 'attribute_settings::default_in_recipe' + And it includes the recipe 'attribute_settings_normal' + When I run the chef-client + Then the run should exit '0' + Then a file named 'attribute_setting.txt' should contain '4' + When the node is retrieved from the API + Then the inflated responses key 'attribute_priority_was' should be the integer '4' + + Scenario: Set a normal attribute in a cookbook recipe + Given a validated node + And it includes the role 'attribute_settings_default' + And it includes the recipe 'attribute_settings::default_in_recipe' + And it includes the recipe 'attribute_settings_normal::normal_in_recipe' + When I run the chef-client + Then the run should exit '0' + Then a file named 'attribute_setting.txt' should contain '5' + When the node is retrieved from the API + Then the inflated responses key 'attribute_priority_was' should be the integer '5' + + Scenario: Set a override attribute in a cookbook attribute file + Given a validated node + And it includes the role 'attribute_settings_default' + And it includes the recipe 'attribute_settings::default_in_recipe' + And it includes the recipe 'attribute_settings_normal::normal_in_recipe' + And it includes the recipe 'attribute_settings_override' + When I run the chef-client + Then the run should exit '0' + Then a file named 'attribute_setting.txt' should contain '6' + When the node is retrieved from the API + Then the inflated responses key 'attribute_priority_was' should be the integer '6' + + Scenario: Set the override attribute in a role + Given a 'role' named 'attribute_settings_default' exists + And a 'role' named 'attribute_settings_override' exists + And a validated node + And it includes the role 'attribute_settings_default' + And it includes the recipe 'attribute_settings::default_in_recipe' + And it includes the recipe 'attribute_settings_normal::normal_in_recipe' + And it includes the recipe 'attribute_settings_override' + And it includes the role 'attribute_settings_override' + When I run the chef-client + Then the run should exit '0' + And a file named 'attribute_setting.txt' should contain '7' + When the node is retrieved from the API + Then the inflated responses key 'attribute_priority_was' should be the integer '7' + + Scenario: Set the override attribute in a recipe + Given a 'role' named 'attribute_settings_default' exists + And a 'role' named 'attribute_settings_override' exists + And a validated node + And it includes the role 'attribute_settings_default' + And it includes the recipe 'attribute_settings::default_in_recipe' + And it includes the recipe 'attribute_settings_normal::normal_in_recipe' + And it includes the recipe 'attribute_settings_override' + And it includes the role 'attribute_settings_override' + And it includes the recipe 'attribute_settings_override::override_in_recipe' + When I run the chef-client + Then the run should exit '0' + And a file named 'attribute_setting.txt' should contain '8' + When the node is retrieved from the API + Then the inflated responses key 'attribute_priority_was' should be the integer '8' + |