You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by ma...@apache.org on 2011/06/27 16:25:47 UTC

svn commit: r1140174 - in /incubator/deltacloud/trunk/client/specs: hardware_profiles_spec.rb instances_spec.rb

Author: marios
Date: Mon Jun 27 14:25:46 2011
New Revision: 1140174

URL: http://svn.apache.org/viewvc?rev=1140174&view=rev
Log:
Update/Fix failing client unit tests

Modified:
    incubator/deltacloud/trunk/client/specs/hardware_profiles_spec.rb
    incubator/deltacloud/trunk/client/specs/instances_spec.rb

Modified: incubator/deltacloud/trunk/client/specs/hardware_profiles_spec.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/client/specs/hardware_profiles_spec.rb?rev=1140174&r1=1140173&r2=1140174&view=diff
==============================================================================
--- incubator/deltacloud/trunk/client/specs/hardware_profiles_spec.rb (original)
+++ incubator/deltacloud/trunk/client/specs/hardware_profiles_spec.rb Mon Jun 27 14:25:46 2011
@@ -38,8 +38,8 @@ describe "hardware_profiles" do
         hardware_profiles.each do |hwp|
           hwp.uri.should_not be_nil
           hwp.uri.should be_a(String)
-          prop_check(hwp.architecture, String)  if hwp.architecture
-        end
+          prop_check(hwp.architecture, String) unless hwp.name.eql?("opaque")
+       end
       end
     end
   end

Modified: incubator/deltacloud/trunk/client/specs/instances_spec.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/client/specs/instances_spec.rb?rev=1140174&r1=1140173&r2=1140174&view=diff
==============================================================================
--- incubator/deltacloud/trunk/client/specs/instances_spec.rb (original)
+++ incubator/deltacloud/trunk/client/specs/instances_spec.rb Mon Jun 27 14:25:46 2011
@@ -34,7 +34,7 @@ describe "instances" do
           instance.owner_id.should_not be_nil
           instance.owner_id.should be_a( String )
           instance.image.should_not be_nil
-          instance.image.should be_a( DeltaCloud::API::Base::Image )
+          instance.image.to_s.should match(/DeltaCloud::API::.*::Image/)
           instance.hardware_profile.should_not be_nil
           instance.hardware_profile.should be_a( DeltaCloud::API::Base::HardwareProfile )
           instance.state.should_not be_nil
@@ -185,9 +185,11 @@ describe "instances" do
       DeltaCloud.new( API_NAME, API_PASSWORD, API_URL ) do |client|
         instance = client.instance( 'inst1' )
         instance.should_not be_nil
+        unless instance.state.eql?("RUNNING")
+          instance.start!
+        end
         instance.state.should eql( "RUNNING" )
-        instance.start!
-        instance.state.should eql( "RUNNING" )
+        lambda{instance.start!}.should raise_error
       end
     end