diff options
author | Daniel DeLeo <dan@opscode.com> | 2011-03-03 08:15:45 -0800 |
---|---|---|
committer | Daniel DeLeo <dan@opscode.com> | 2011-03-03 08:15:45 -0800 |
commit | 5da75c4dd032b4d9787481836e774f80285c7305 (patch) | |
tree | 9f7f3024a727ef72c9164d1fe216501ed3c8cb60 /features | |
parent | 1bfb42ebd8cbd93ba3a1cc8a8055ed123fda855b (diff) | |
download | chef-5da75c4dd032b4d9787481836e774f80285c7305.tar.gz |
fix knife cmd and integration tests broken by api changes
Diffstat (limited to 'features')
-rw-r--r-- | features/data/cookbooks/synchronize_deps/metadata.json | 58 | ||||
-rw-r--r-- | features/data/cookbooks/transfer_remote_files/metadata.json | 58 | ||||
-rw-r--r-- | features/knife/coobook_upload.feature | 3 | ||||
-rw-r--r-- | features/steps/response_steps.rb | 8 |
4 files changed, 66 insertions, 61 deletions
diff --git a/features/data/cookbooks/synchronize_deps/metadata.json b/features/data/cookbooks/synchronize_deps/metadata.json index 925a92ae34..146f154d6e 100644 --- a/features/data/cookbooks/synchronize_deps/metadata.json +++ b/features/data/cookbooks/synchronize_deps/metadata.json @@ -1,30 +1,30 @@ { - "recipes": { - }, - "maintainer": "Your Name", - "replacing": { - }, - "license": "Apache v2.0", - "maintainer_email": "youremail@example.com", - "groupings": { - }, - "platforms": { - }, - "recommendations": { - }, - "long_description": "", - "description": "A fabulous new cookbook", - "suggestions": { - }, - "attributes": { - }, - "conflicting": { - }, - "name": "synchronize_deps", - "version": "0.0.0", - "dependencies": { - "synchronize": ">= 0.0.0" - }, - "providing": { - } -}
\ No newline at end of file + "name": "synchronize_deps", + "description": "A fabulous new cookbook", + "long_description": "", + "maintainer": "Your Name", + "maintainer_email": "youremail@example.com", + "license": "Apache v2.0", + "platforms": { + }, + "dependencies": { + "synchronize": ">= 0.0.0" + }, + "recommendations": { + }, + "suggestions": { + }, + "conflicting": { + }, + "providing": { + }, + "replacing": { + }, + "attributes": { + }, + "groupings": { + }, + "recipes": { + }, + "version": "0.0.0" + }
\ No newline at end of file diff --git a/features/data/cookbooks/transfer_remote_files/metadata.json b/features/data/cookbooks/transfer_remote_files/metadata.json index ac1a7222e9..382d0e36b4 100644 --- a/features/data/cookbooks/transfer_remote_files/metadata.json +++ b/features/data/cookbooks/transfer_remote_files/metadata.json @@ -1,30 +1,30 @@ { - "recipes": { - }, - "maintainer": "Your Name", - "replacing": { - }, - "license": "Apache v2.0", - "maintainer_email": "youremail@example.com", - "groupings": { - }, - "platforms": { - }, - "recommendations": { - }, - "long_description": "", - "description": "A fabulous new cookbook", - "suggestions": { - }, - "attributes": { - }, - "conflicting": { - }, - "name": "transfer_remote_files", - "version": "0.0.0", - "dependencies": { - "transfer_remote_files_definition": ">= 0.0.0" - }, - "providing": { - } -}
\ No newline at end of file + "name": "transfer_remote_files", + "description": "A fabulous new cookbook", + "long_description": "", + "maintainer": "Your Name", + "maintainer_email": "youremail@example.com", + "license": "Apache v2.0", + "platforms": { + }, + "dependencies": { + "transfer_remote_files_definition": ">= 0.0.0" + }, + "recommendations": { + }, + "suggestions": { + }, + "conflicting": { + }, + "providing": { + }, + "replacing": { + }, + "attributes": { + }, + "groupings": { + }, + "recipes": { + }, + "version": "0.0.0" + }
\ No newline at end of file diff --git a/features/knife/coobook_upload.feature b/features/knife/coobook_upload.feature index 82470729d8..a6cc7c091c 100644 --- a/features/knife/coobook_upload.feature +++ b/features/knife/coobook_upload.feature @@ -9,5 +9,4 @@ Feature: Upload Cookbooks with Knife Given I am an administrator When I upload the 'version_updated' cookbook with knife When I 'GET' to the path '/cookbooks/version_updated' - Then the inflated responses key 'version_updated' item '0' should be '2.0.0' - + Then the inflated response should equal '{"version_updated"=>{"url"=>"http://127.0.0.1:4000/cookbooks/version_updated", "versions"=>[{"url"=>"http://127.0.0.1:4000/cookbooks/version_updated/2.0.0", "version"=>"2.0.0"}]}}' diff --git a/features/steps/response_steps.rb b/features/steps/response_steps.rb index eb25d5449c..c32d291c64 100644 --- a/features/steps/response_steps.rb +++ b/features/steps/response_steps.rb @@ -175,6 +175,12 @@ Then /^the inflated response should be a kind of '(.+)'$/ do |thing| self.inflated_response.should be_a_kind_of(eval(thing)) end +Then "the inflated response should equal '$code'" do |code| + # cucumber can suck it, I'm using real code. + expected = eval(code) + inflated_response.should == expected +end + Then /^the inflated response should respond to '(.+)' with '(.+)'$/ do |method, to_match| to_match = Chef::JSONCompat.from_json(to_match) if to_match =~ /^\[|\{/ to_match = true if to_match == 'true' @@ -211,4 +217,4 @@ Then /^the data_bag named '(.+)' should not have an item named '(.+)'$/ do |data exists = false end exists.should == false -end
\ No newline at end of file +end |