From: marios <[email protected]>

Signed-off-by: marios <[email protected]>
---
 client/specs/hardware_profiles_spec.rb |    4 ++--
 client/specs/instances_spec.rb         |    8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/client/specs/hardware_profiles_spec.rb 
b/client/specs/hardware_profiles_spec.rb
index 7957e99..59bfae0 100644
--- a/client/specs/hardware_profiles_spec.rb
+++ b/client/specs/hardware_profiles_spec.rb
@@ -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
diff --git a/client/specs/instances_spec.rb b/client/specs/instances_spec.rb
index c309c24..0f431e3 100644
--- a/client/specs/instances_spec.rb
+++ b/client/specs/instances_spec.rb
@@ -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
 
-- 
1.7.3.4

Reply via email to