deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 5/9] Core: Make tests pickup correct exceptions
Date Thu, 26 Jul 2012 11:29:34 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/tests/drivers/mock/images_test.rb |    2 +-
 server/tests/drivers/mock/keys_test.rb   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/tests/drivers/mock/images_test.rb b/server/tests/drivers/mock/images_test.rb
index 746000c..7165e65 100644
--- a/server/tests/drivers/mock/images_test.rb
+++ b/server/tests/drivers/mock/images_test.rb
@@ -42,7 +42,7 @@ describe 'MockDriver Images' do
     @driver.image(:id => 'img1-test').id.must_equal 'img1-test'
     @driver.image(:id => 'img1-test').name.must_equal 'img1-test'
     @driver.image(:id => 'img1-test').description.must_equal 'Test1'
-    Proc.new { @driver.create_image(:id => 'unknown-instance', :name => 'test') }.must_raise
Deltacloud::ExceptionHandler::ProviderError, 'CreateImageNotSupported'
+    Proc.new { @driver.create_image(:id => 'unknown-instance', :name => 'test') }.must_raise
Deltacloud::ExceptionHandler::BackendError, 'CreateImageNotSupported'
     @driver.image(:id => 'test').must_be_nil
   end
 
diff --git a/server/tests/drivers/mock/keys_test.rb b/server/tests/drivers/mock/keys_test.rb
index bebe3ec..296b909 100644
--- a/server/tests/drivers/mock/keys_test.rb
+++ b/server/tests/drivers/mock/keys_test.rb
@@ -38,7 +38,7 @@ describe 'MockDriver Keys' do
     key = @driver.create_key(:key_name => 'test1')
     key.wont_be_nil
     key.must_be_kind_of Key
-    Proc.new { @driver.create_key(:key_name => 'test1') }.must_raise Deltacloud::ExceptionHandler::ProviderError,
'KeyExist'
+    Proc.new { @driver.create_key(:key_name => 'test1') }.must_raise Deltacloud::ExceptionHandler::ForbiddenError,
'KeyExist'
     @driver.destroy_key :id => key.id
     @driver.key(:id => key.id).must_be_nil
   end
-- 
1.7.10.2


Mime
View raw message