diff options
author | Daniel DeLeo <dan@opscode.com> | 2010-06-28 17:07:35 -0700 |
---|---|---|
committer | Daniel DeLeo <dan@opscode.com> | 2010-06-28 17:07:35 -0700 |
commit | 483a6f8915f87c6b37533568d11f43b131350ec2 (patch) | |
tree | 49876b037614526f9c206467fbb9b9866a4f9205 /features/data | |
parent | ba39367ac434f1804e19133a30343cbde76490cf (diff) | |
download | chef-483a6f8915f87c6b37533568d11f43b131350ec2.tar.gz |
test that include_attribute 'COOKBOOK_NAME' w/ implicit default works
Diffstat (limited to 'features/data')
5 files changed, 44 insertions, 0 deletions
diff --git a/features/data/cookbooks/attribute_include_default/README.rdoc b/features/data/cookbooks/attribute_include_default/README.rdoc new file mode 100644 index 0000000000..8d774805b9 --- /dev/null +++ b/features/data/cookbooks/attribute_include_default/README.rdoc @@ -0,0 +1,8 @@ += DESCRIPTION: + += REQUIREMENTS: + += ATTRIBUTES: + += USAGE: + diff --git a/features/data/cookbooks/attribute_include_default/attributes/a.rb b/features/data/cookbooks/attribute_include_default/attributes/a.rb new file mode 100644 index 0000000000..53b60c55de --- /dev/null +++ b/features/data/cookbooks/attribute_include_default/attributes/a.rb @@ -0,0 +1,5 @@ +# should be equivalent to include_attribute 'attribute_include_default::default' +include_attribute 'attribute_include_default' +set[:mars_volta] = mars_volta_name +set[:mars_volta_is] = mars_volta_will_be + diff --git a/features/data/cookbooks/attribute_include_default/attributes/default.rb b/features/data/cookbooks/attribute_include_default/attributes/default.rb new file mode 100644 index 0000000000..bd5e056c04 --- /dev/null +++ b/features/data/cookbooks/attribute_include_default/attributes/default.rb @@ -0,0 +1,2 @@ +set[:mars_volta_name] = 'mars_volta' +set[:mars_volta_will_be] = 'dope' diff --git a/features/data/cookbooks/attribute_include_default/metadata.rb b/features/data/cookbooks/attribute_include_default/metadata.rb new file mode 100644 index 0000000000..07c1801d28 --- /dev/null +++ b/features/data/cookbooks/attribute_include_default/metadata.rb @@ -0,0 +1,6 @@ +maintainer "Opscode" +maintainer_email "do_not_reply@opscode.com" +license "Apache 2.0" +description "Installs/Configures recipe_include" +long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) +version "0.1" diff --git a/features/data/cookbooks/attribute_include_default/recipes/default.rb b/features/data/cookbooks/attribute_include_default/recipes/default.rb new file mode 100644 index 0000000000..a211dc5928 --- /dev/null +++ b/features/data/cookbooks/attribute_include_default/recipes/default.rb @@ -0,0 +1,23 @@ +# +# Cookbook Name:: recipe_include +# Recipe:: second +# +# Copyright 2009, Opscode +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +execute "append to #{node[:tmpdir]}/mars_volta" do + command "echo '#{node.mars_volta} is #{node.mars_volta_is}' >> #{node[:tmpdir]}/mars_volta" +end + |