deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: [PATCH] added test for mock buckets
Date Tue, 27 Nov 2012 07:25:38 GMT
ACK

thanks! - this is a great start

marios


On 24/11/12 19:06, martha.c.chumo@gmail.com wrote:
> From: njerichelimo <martha.c.chumo@gmail.com>
> 
> ---
>  server/tests/drivers/mock/buckets_test.rb |   18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>  create mode 100644 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