summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsdelano <stephen@opscode.com>2010-08-23 10:42:58 -0700
committersdelano <stephen@opscode.com>2010-08-26 13:19:10 -0700
commit3f03fa589e39a615c7cbc0962c1988c8eb8c342d (patch)
tree7f0015e38ea94d3dd7b9a36908f2e5f5ff810df6
parent9db9fb6a78be33204742d21e49469945829e3963 (diff)
downloadchef-3f03fa589e39a615c7cbc0962c1988c8eb8c342d.tar.gz
feature steps for multiple cookbooks
-rw-r--r--features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/metadata.json39
-rw-r--r--features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/metadata.rb6
-rw-r--r--features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/recipes/default.rb18
-rw-r--r--features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/metadata.json39
-rw-r--r--features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/metadata.rb6
-rw-r--r--features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/recipes/default.rb18
-rw-r--r--features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/metadata.json39
-rw-r--r--features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/metadata.rb6
-rw-r--r--features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/recipes/default.rb18
-rw-r--r--features/steps/cookbook_steps.rb14
10 files changed, 203 insertions, 0 deletions
diff --git a/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/metadata.json b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/metadata.json
new file mode 100644
index 0000000000..eae485e650
--- /dev/null
+++ b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/metadata.json
@@ -0,0 +1,39 @@
+{
+ "version": "0.1.0",
+ "suggestions": {
+
+ },
+ "conflicting": {
+
+ },
+ "license": "Apache 2.0",
+ "providing": {
+
+ },
+ "maintainer": "Opscode",
+ "replacing": {
+
+ },
+ "platforms": {
+
+ },
+ "description": "Tests cookbook versioning in environments",
+ "recipes": {
+
+ },
+ "maintainer_email": "do_not_reply@opscode.com",
+ "name": "version_test",
+ "groupings": {
+
+ },
+ "attributes": {
+
+ },
+ "long_description": "",
+ "recommendations": {
+
+ },
+ "dependencies": {
+
+ }
+} \ No newline at end of file
diff --git a/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/metadata.rb b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/metadata.rb
new file mode 100644
index 0000000000..39bcd84875
--- /dev/null
+++ b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/metadata.rb
@@ -0,0 +1,6 @@
+name "version_test"
+maintainer "Opscode"
+maintainer_email "do_not_reply@opscode.com"
+license "Apache 2.0"
+description "Tests cookbook versioning in environments"
+version "0.1.0" \ No newline at end of file
diff --git a/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/recipes/default.rb b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/recipes/default.rb
new file mode 100644
index 0000000000..dc2a253959
--- /dev/null
+++ b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/recipes/default.rb
@@ -0,0 +1,18 @@
+#
+# Cookbook Name:: template
+# Recipe:: default
+#
+# Copyright 2010, Opscode, Inc.
+#
+# 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.
+#
diff --git a/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/metadata.json b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/metadata.json
new file mode 100644
index 0000000000..e472affefd
--- /dev/null
+++ b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/metadata.json
@@ -0,0 +1,39 @@
+{
+ "version": "0.1.1",
+ "suggestions": {
+
+ },
+ "conflicting": {
+
+ },
+ "license": "Apache 2.0",
+ "providing": {
+
+ },
+ "maintainer": "Opscode",
+ "replacing": {
+
+ },
+ "platforms": {
+
+ },
+ "description": "Tests cookbook versioning in environments",
+ "recipes": {
+
+ },
+ "maintainer_email": "do_not_reply@opscode.com",
+ "name": "version_test",
+ "groupings": {
+
+ },
+ "attributes": {
+
+ },
+ "long_description": "",
+ "recommendations": {
+
+ },
+ "dependencies": {
+
+ }
+} \ No newline at end of file
diff --git a/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/metadata.rb b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/metadata.rb
new file mode 100644
index 0000000000..a004e837f0
--- /dev/null
+++ b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/metadata.rb
@@ -0,0 +1,6 @@
+name "version_test"
+maintainer "Opscode"
+maintainer_email "do_not_reply@opscode.com"
+license "Apache 2.0"
+description "Tests cookbook versioning in environments"
+version "0.1.1" \ No newline at end of file
diff --git a/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/recipes/default.rb b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/recipes/default.rb
new file mode 100644
index 0000000000..dc2a253959
--- /dev/null
+++ b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/recipes/default.rb
@@ -0,0 +1,18 @@
+#
+# Cookbook Name:: template
+# Recipe:: default
+#
+# Copyright 2010, Opscode, Inc.
+#
+# 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.
+#
diff --git a/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/metadata.json b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/metadata.json
new file mode 100644
index 0000000000..887a1079cf
--- /dev/null
+++ b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/metadata.json
@@ -0,0 +1,39 @@
+{
+ "version": "0.2.0",
+ "suggestions": {
+
+ },
+ "conflicting": {
+
+ },
+ "license": "Apache 2.0",
+ "providing": {
+
+ },
+ "maintainer": "Opscode",
+ "replacing": {
+
+ },
+ "platforms": {
+
+ },
+ "description": "Tests cookbook versioning in environments",
+ "recipes": {
+
+ },
+ "maintainer_email": "do_not_reply@opscode.com",
+ "name": "version_test",
+ "groupings": {
+
+ },
+ "attributes": {
+
+ },
+ "long_description": "",
+ "recommendations": {
+
+ },
+ "dependencies": {
+
+ }
+} \ No newline at end of file
diff --git a/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/metadata.rb b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/metadata.rb
new file mode 100644
index 0000000000..4202c9ca9f
--- /dev/null
+++ b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/metadata.rb
@@ -0,0 +1,6 @@
+name "version_test"
+maintainer "Opscode"
+maintainer_email "do_not_reply@opscode.com"
+license "Apache 2.0"
+description "Tests cookbook versioning in environments"
+version "0.2.0" \ No newline at end of file
diff --git a/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/recipes/default.rb b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/recipes/default.rb
new file mode 100644
index 0000000000..dc2a253959
--- /dev/null
+++ b/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/recipes/default.rb
@@ -0,0 +1,18 @@
+#
+# Cookbook Name:: template
+# Recipe:: default
+#
+# Copyright 2010, Opscode, Inc.
+#
+# 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.
+#
diff --git a/features/steps/cookbook_steps.rb b/features/steps/cookbook_steps.rb
index e830d42821..7e2be0d122 100644
--- a/features/steps/cookbook_steps.rb
+++ b/features/steps/cookbook_steps.rb
@@ -310,3 +310,17 @@ Then /^the downloaded cookbook file contents should match the pattern '(.+)'$/ d
@downloaded_cookbook_file_contents.should =~ /#{pattern}/
end
+Then /^the dependencies in its metadata should be an empty hash$/ do
+ inflated_response.metadata.dependencies.should == {}
+end
+
+Then /^the metadata should include a dependency on '(.+)'$/ do |key|
+ inflated_response.metadata.dependencies.should have_key(key)
+end
+
+Given "I upload multiple versions of the 'version_test' cookbook" do
+ When "I fully upload a sandboxed cookbook force-named 'version_test' versioned '0.1.0' with 'version_test_0.1.0'"
+ When "I fully upload a sandboxed cookbook force-named 'version_test' versioned '0.1.1' with 'version_test_0.1.1'"
+ When "I fully upload a sandboxed cookbook force-named 'version_test' versioned '0.2.0' with 'version_test_0.2.0'"
+end
+