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 2/2] added minitest can_create_bucket in mock driver
Date Tue, 27 Nov 2012 07:34:38 GMT
ACK

not sure if it was my mail client - but your two patches arrived
separately. You can use the --thread option for git send-mail:

git send-mail --to dev@deltacloud.apache.org --thread
/path/to/patches/*.patch

this will create a mail thread with any patches under that directory.

Also, you forgot the patch file which got committed - i.e. in patch2/2
you included patch1 in the changes. You should move the patch files out
of the deltacloud directory structure before making your patches. I just
removed this with a new commit on top of yours and pushed to master,

thanks, marios

On 27/11/12 08:34, martha.c.chumo@gmail.com wrote:
> From: njerichelimo <martha.c.chumo@gmail.com>
> 
> ---
>  .../mock/0001-added-test-for-mock-buckets.patch    |   37 ++++++++++++++++++++
>  server/tests/drivers/mock/buckets_test.rb          |    9 +++++
>  2 files changed, 46 insertions(+)
>  create mode 100644 server/tests/drivers/mock/0001-added-test-for-mock-buckets.patch
> 
> diff --git a/server/tests/drivers/mock/0001-added-test-for-mock-buckets.patch b/server/tests/drivers/mock/0001-added-test-for-mock-buckets.patch
> new file mode 100644
> index 0000000..32bc355
> --- /dev/null
> +++ b/server/tests/drivers/mock/0001-added-test-for-mock-buckets.patch
> @@ -0,0 +1,37 @@
> +From 60143df59652ffa6fe75fdb3c1d8350bd1bccd9a Mon Sep 17 00:00:00 2001
> +From: njerichelimo <martha.c.chumo@gmail.com>
> +Date: Sat, 24 Nov 2012 19:33:27 +0300
> +Subject: [PATCH] added test for mock buckets
> +
> +---
> + 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
> +-- 
> +1.7.9.5
> +
> diff --git a/server/tests/drivers/mock/buckets_test.rb b/server/tests/drivers/mock/buckets_test.rb
> index 5b46aac..044ba0c 100644
> --- a/server/tests/drivers/mock/buckets_test.rb
> +++ b/server/tests/drivers/mock/buckets_test.rb
> @@ -15,4 +15,13 @@ describe 'MockDriver Buckets' do
>      end.must_raise Deltacloud::Exceptions::AuthenticationFailure, 'Authentication Failure'
>    end
>  
> +  it 'can create a new bucket' do
> +    bucket_name = "mini_test_mock_bucket_name"
> +    bucket = @driver.create_bucket(bucket_name)
> +    bucket.id.wont_be_nil
> +    bucket.name.must_equal bucket_name
> +    bucket.size.must_equal "0"
> +    bucket.blob_list.must_be_empty
> +  end
> +
>  end
> 


Mime
View raw message