deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1234796 - in /deltacloud/trunk/tests/mock: instances.feature step_definitions/api_steps.rb step_definitions/instances_steps.rb
Date Mon, 23 Jan 2012 13:53:49 GMT
Author: mfojtik
Date: Mon Jan 23 13:53:48 2012
New Revision: 1234796

URL: http://svn.apache.org/viewvc?rev=1234796&view=rev
Log:
Mock: Fixed some failing Cucumber scenarios

Signed-off-by: Michal fojtik <mfojtik@redhat.com>

Modified:
    deltacloud/trunk/tests/mock/instances.feature
    deltacloud/trunk/tests/mock/step_definitions/api_steps.rb
    deltacloud/trunk/tests/mock/step_definitions/instances_steps.rb

Modified: deltacloud/trunk/tests/mock/instances.feature
URL: http://svn.apache.org/viewvc/deltacloud/trunk/tests/mock/instances.feature?rev=1234796&r1=1234795&r2=1234796&view=diff
==============================================================================
--- deltacloud/trunk/tests/mock/instances.feature (original)
+++ deltacloud/trunk/tests/mock/instances.feature Mon Jan 23 13:53:48 2012
@@ -17,6 +17,7 @@ Feature: Managing instances
     | authentication |
     | public_addresses |
     | private_addresses |
+    | storage_volumes |
     And each instance should have 'href' attribute with valid URL
     And this URI should be available in XML, JSON, HTML format
 
@@ -48,6 +49,7 @@ Feature: Managing instances
     | authentication |
     | public_addresses |
     | private_addresses |
+    | storage_volumes |
 
   Scenario: Following image href in instance
     Given URI /api/instances exists

Modified: deltacloud/trunk/tests/mock/step_definitions/api_steps.rb
URL: http://svn.apache.org/viewvc/deltacloud/trunk/tests/mock/step_definitions/api_steps.rb?rev=1234796&r1=1234795&r2=1234796&view=diff
==============================================================================
--- deltacloud/trunk/tests/mock/step_definitions/api_steps.rb (original)
+++ deltacloud/trunk/tests/mock/step_definitions/api_steps.rb Mon Jan 23 13:53:48 2012
@@ -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

Modified: deltacloud/trunk/tests/mock/step_definitions/instances_steps.rb
URL: http://svn.apache.org/viewvc/deltacloud/trunk/tests/mock/step_definitions/instances_steps.rb?rev=1234796&r1=1234795&r2=1234796&view=diff
==============================================================================
--- deltacloud/trunk/tests/mock/step_definitions/instances_steps.rb (original)
+++ deltacloud/trunk/tests/mock/step_definitions/instances_steps.rb Mon Jan 23 13:53:48 2012
@@ -36,10 +36,11 @@ When /^client follow link in actions$/ d
   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
 



Mime
View raw message