deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [1/50] [abbrv] git commit: RHEV-M: Disabled two images tests for MRI1.8
Date Mon, 30 Jul 2012 14:29:16 GMT
Updated Branches:
  refs/heads/master 99972905b -> 1ed496814


RHEV-M: Disabled two images tests for MRI1.8

Tests were disabled due to YAML serialization
bug in Ruby MRI 1.8 that cause VCR to fail in
reading the cassette YAML file.


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/e8bb21c5
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/e8bb21c5
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/e8bb21c5

Branch: refs/heads/master
Commit: e8bb21c555f9e6168dca6371741667692c2030f8
Parents: 8264f28
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Mon Jul 30 16:23:35 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Mon Jul 30 16:25:00 2012 +0200

----------------------------------------------------------------------
 server/tests/drivers/rhevm/images_test.rb |   30 +++++++++++++++--------
 1 files changed, 19 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/e8bb21c5/server/tests/drivers/rhevm/images_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/rhevm/images_test.rb b/server/tests/drivers/rhevm/images_test.rb
index 28d18b1..4105c6b 100644
--- a/server/tests/drivers/rhevm/images_test.rb
+++ b/server/tests/drivers/rhevm/images_test.rb
@@ -38,20 +38,28 @@ describe 'RhevmDriver Images' do
   end
 
   it 'must allow to retrieve single image' do
-    @driver.image(:id => 'dfa924b7-83e8-4a5c-9d5c-1270fd0c0872').wont_be_nil
-    @driver.image(:id => 'dfa924b7-83e8-4a5c-9d5c-1270fd0c0872').must_be_kind_of Image
-    @driver.image(:id => 'dfa924b7-83e8-4a5c-9d5c-1270fd0c0872').id.must_equal 'dfa924b7-83e8-4a5c-9d5c-1270fd0c0872'
-    @driver.image(:id => 'ami-aaaaaaaa').must_be_nil
-    @driver.image(:id => 'unknown').must_be_nil
+    # NOTE: This test will cause VCR to fail due to wrong serialization
+    # of YAML under Ruby 1.8.
+    #
+    if RUBY_VERSION =~ /^1\.9/
+      puts "=asdasdasd"
+      @driver.image(:id => 'dfa924b7-83e8-4a5c-9d5c-1270fd0c0872').wont_be_nil
+      @driver.image(:id => 'dfa924b7-83e8-4a5c-9d5c-1270fd0c0872').must_be_kind_of Image
+      @driver.image(:id => 'dfa924b7-83e8-4a5c-9d5c-1270fd0c0872').id.must_equal 'dfa924b7-83e8-4a5c-9d5c-1270fd0c0872'
+      @driver.image(:id => 'ami-aaaaaaaa').must_be_nil
+      @driver.image(:id => 'unknown').must_be_nil
+    end
   end
 
   it 'must throw proper exception when destroying used image' do
-    image = @driver.image(:id => 'dfa924b7-83e8-4a5c-9d5c-1270fd0c0872')
-    image.wont_be_nil
-    image.state.must_equal 'OK'
-    Proc.new {
-      @driver.destroy_image(image.id)
-    }.must_raise Deltacloud::ExceptionHandler::BackendError, 'Cannot delete Template. Template
is being used by the following VMs: test1.'
+    if RUBY_VERSION =~ /^1\.9/
+      image = @driver.image(:id => 'dfa924b7-83e8-4a5c-9d5c-1270fd0c0872')
+      image.wont_be_nil
+      image.state.must_equal 'OK'
+      Proc.new {
+        @driver.destroy_image(image.id)
+      }.must_raise Deltacloud::ExceptionHandler::BackendError, 'Cannot delete Template. Template
is being used by the following VMs: test1.'
+    end
   end
 
   it 'must support destroying images' do


Mime
View raw message