ack to series, minor nits: after this patch 4/4 i ran
rake cucumber:mock:test
and got 1 error - same as the fix for 'storage_volumes' you have here,
there is one more place it's needed at tests/mock/instances.feature line
19 ("Scenario: Listing current instances)
also 1/4 gave me whitespace warning fyi
(DCore/deltacloud/.git/rebase-apply/patch:9: new blank line at EOF.
+
fatal: 1 line adds whitespace errors.
Patch failed at 0001 Core: Added more verbose 500 error reports in XML)
On 23/01/12 13:23, [email protected] wrote:
> From: Michal Fojtik <[email protected]>
>
> Signed-off-by: Michal fojtik <[email protected]>
> ---
> tests/mock/instances.feature | 1 +
> tests/mock/step_definitions/api_steps.rb | 4 +++-
> tests/mock/step_definitions/instances_steps.rb | 5 +++--
> 3 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/tests/mock/instances.feature b/tests/mock/instances.feature
> index 460e7a7..ae49e79 100644
> --- a/tests/mock/instances.feature
> +++ b/tests/mock/instances.feature
> @@ -48,6 +48,7 @@ Feature: Managing instances
> | authentication |
> | public_addresses |
> | private_addresses |
> + | storage_volumes |
>
> Scenario: Following image href in instance
> Given URI /api/instances exists
> diff --git a/tests/mock/step_definitions/api_steps.rb
> b/tests/mock/step_definitions/api_steps.rb
> index 1169a97..27d1e8f 100644
> --- a/tests/mock/step_definitions/api_steps.rb
> +++ b/tests/mock/step_definitions/api_steps.rb
> @@ -1,5 +1,7 @@
> +World(Rack::Test::Methods)
> +
> Given /^URI ([\w\/\-_]+) exists$/ do |uri|
> - get uri, {}
> + get uri
> last_response.status.should_not == 404
> last_response.status.should_not == 500
> @uri = uri
> diff --git a/tests/mock/step_definitions/instances_steps.rb
> b/tests/mock/step_definitions/instances_steps.rb
> index fd86903..3016bd8 100644
> --- a/tests/mock/step_definitions/instances_steps.rb
> +++ b/tests/mock/step_definitions/instances_steps.rb
> @@ -36,10 +36,11 @@ When /^client follow link in actions$/ do
> l = @instance.xpath('actions/link[@rel="'+@action+'"]').first
>
> if @action.eql?('destroy')
> - delete l[:href], { :id => @instance.xpath('@id').first.text }
> + delete l[:href]
> else
> - post l[:href], { :id => @instance.xpath('@id').first.text }
> + post l[:href]
> end
> + puts last_response.body if last_response.status == 500
> last_response.status.should_not == 500
> end
>