deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject git commit: added test for mock buckets
Date Tue, 27 Nov 2012 07:26:25 GMT
Updated Branches:
  refs/heads/master 6dfef2069 -> 52b60d134


added test for mock buckets


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

Branch: refs/heads/master
Commit: 52b60d134698600c6f2cd4bb542b2aa217004b7f
Parents: 6dfef20
Author: njerichelimo <martha.c.chumo@gmail.com>
Authored: Sat Nov 24 20:06:37 2012 +0300
Committer: marios <marios@redhat.com>
Committed: Tue Nov 27 09:21:51 2012 +0200

----------------------------------------------------------------------
 server/tests/drivers/mock/buckets_test.rb |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/52b60d13/server/tests/drivers/mock/buckets_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/mock/buckets_test.rb b/server/tests/drivers/mock/buckets_test.rb
new file mode 100644
index 0000000..5b46aac
--- /dev/null
+++ b/server/tests/drivers/mock/buckets_test.rb
@@ -0,0 +1,18 @@
+require 'minitest/autorun'
+
+require_relative File.join('..', '..', '..', 'lib', 'deltacloud', 'api.rb')
+require_relative 'common.rb'
+
+describe 'MockDriver Buckets' do
+
+  before do
+    @driver = Deltacloud::new(:mock, :user => 'mockuser', :password => 'mockpassword')
+  end
+
+  it 'must throw error when wrong credentials for buckets' do
+    Proc.new do
+      @driver.backend.buckets(OpenStruct.new(:user => 'unknown', :password => 'wrong'))
+    end.must_raise Deltacloud::Exceptions::AuthenticationFailure, 'Authentication Failure'
+  end
+
+end


Mime
View raw message