deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1199728 - in /incubator/deltacloud/trunk/server: ./ tests/ tests/drivers/common_fixtures/ tests/drivers/google/ tests/drivers/google/fixtures/
Date Wed, 09 Nov 2011 13:00:03 GMT
Author: marios
Date: Wed Nov  9 13:00:03 2011
New Revision: 1199728

URL: http://svn.apache.org/viewvc?rev=1199728&view=rev
Log:
Unit tests for google storage driver

Added:
    incubator/deltacloud/trunk/server/tests/drivers/common_fixtures/
    incubator/deltacloud/trunk/server/tests/drivers/common_fixtures/deltacloud_blob_test.png
    incubator/deltacloud/trunk/server/tests/drivers/google/
    incubator/deltacloud/trunk/server/tests/drivers/google/api_test.rb
    incubator/deltacloud/trunk/server/tests/drivers/google/buckets_test.rb
    incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/
    incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/delete-997d394df9ccfde81ea3073a68d674f173faa56f.yml
    incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/delete-fdd72e5f5a3576ca37a34483de5f623c1c08a7f9.yml
    incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/get-4c5647f476f144847319d51b3c5cebe0d82b5995.yml
    incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/get-ff2e867e891fe52fd64cd797d594ac100e15b61a.yml
    incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/head-997d394df9ccfde81ea3073a68d674f173faa56f.yml
    incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-9543e39820e2be0b739d4bbdf2a4dd3cb7e4e411.yml
    incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-98ac1bc0a4fd1a04833547a50daed7382fc45ee3.yml
    incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-997d394df9ccfde81ea3073a68d674f173faa56f.yml
    incubator/deltacloud/trunk/server/tests/drivers/google/setup.rb
Modified:
    incubator/deltacloud/trunk/server/Rakefile
    incubator/deltacloud/trunk/server/tests/common.rb

Modified: incubator/deltacloud/trunk/server/Rakefile
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/Rakefile?rev=1199728&r1=1199727&r2=1199728&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/Rakefile (original)
+++ incubator/deltacloud/trunk/server/Rakefile Wed Nov  9 13:00:03 2011
@@ -53,7 +53,7 @@ rescue LoadError
 end
 
 namespace :test do
-  %w(mock rackspace rhevm openstack).each do |driver|
+  %w(mock rackspace rhevm openstack google).each do |driver|
     desc "Run #{driver} unit tests"
     Rake::TestTask.new(driver) { |t|
       t.test_files = ['tests/common.rb', "tests/drivers/#{driver}/setup.rb"] + FileList.new("tests/drivers/#{driver}/*_test.rb")
+ FileList.new('tests/rabbit_test.rb')
@@ -75,7 +75,7 @@ end
 
 desc "Call our Test::Unit suite"
 task :test do
-  %w(mock rackspace rhevm).each do |driver|
+  %w(mock rackspace rhevm openstack google).each do |driver|
    Rake::Task["test:#{driver}"].reenable
    Rake::Task["test:#{driver}"].invoke
   end

Modified: incubator/deltacloud/trunk/server/tests/common.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/common.rb?rev=1199728&r1=1199727&r2=1199728&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/tests/common.rb (original)
+++ incubator/deltacloud/trunk/server/tests/common.rb Wed Nov  9 13:00:03 2011
@@ -229,6 +229,50 @@ module DeltacloudTestCommon
     $created_instances << id
   end
 
+ #common variables used by the bucket/blob unit tests across clouds
+  @@created_bucket_name="testbucki2rpux3wdelme"
+  @@created_blob_name="testblobk1ds91kVdelme"
+  @@created_blob_local_file="#{File.dirname(__FILE__)}/drivers/common_fixtures/deltacloud_blob_test.png"
+
+  def check_bucket_basics(bucket, cloud)
+    (bucket/'bucket/name').first.text.should == "#{@@created_bucket_name}#{cloud}"
+    (bucket/'bucket').attribute("id").text.should == "#{@@created_bucket_name}#{cloud}"
+    (bucket/'bucket').length.should > 0
+    (bucket/'bucket/name').first.text.should_not == nil
+    (bucket/'bucket').attribute("href").text.should_not == nil
+  end
+
+  def check_blob_basics(blob, cloud)
+    (blob/'blob').length.should == 1
+    (blob/'blob').attribute("id").text.should_not == nil
+    (blob/'blob').attribute("href").text.should_not==nil
+    (blob/'blob/bucket').text.should_not == nil
+    (blob/'blob/content_length').text.should_not == nil
+    (blob/'blob/content_type').text.should_not == nil
+    (blob/'blob').attribute("id").text.should == "#{@@created_blob_name}#{cloud}"
+    (blob/'blob/bucket').text.should == "#{@@created_bucket_name}#{cloud}"
+    (blob/'blob/content_length').text.to_i.should == File.size(@@created_blob_local_file)
+  end
+
+  def check_blob_metadata(blob, metadata_hash)
+    meta_from_blob = {}
+    #extract metadata from nokogiri blob xml
+    (0.. (((blob/'blob/user_metadata').first).elements.size - 1) ).each do |i|
+      meta_from_blob[(((blob/'blob/user_metadata').first).elements[i].attribute("key").value)]
=
+                                  (((blob/'blob/user_metadata').first).elements[i].children[1].text)
+    end
+    #remove any 'x-goog-meta-' prefixes (problem for google blobs and vcr...)
+    meta_from_blob.gsub_keys(/x-.*-meta-/i, "")
+    meta_from_blob.eql?(metadata_hash).should == true
+  end
+
+  #hash ordering is unpredictable - sort the params hash
+  #so we get same vcr cassette name each time
+  def stable_vcr_cassette_name(method, uri, params)
+    digest = Digest::SHA1.hexdigest("#{uri}-#{params.sort_by {|k,v| k.to_s}}")
+    return "#{method}-#{digest}"
+  end
+
 end
 
 include DeltacloudTestCommon

Added: incubator/deltacloud/trunk/server/tests/drivers/common_fixtures/deltacloud_blob_test.png
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/drivers/common_fixtures/deltacloud_blob_test.png?rev=1199728&view=auto
==============================================================================
Files incubator/deltacloud/trunk/server/tests/drivers/common_fixtures/deltacloud_blob_test.png
(added) and incubator/deltacloud/trunk/server/tests/drivers/common_fixtures/deltacloud_blob_test.png
Wed Nov  9 13:00:03 2011 differ

Added: incubator/deltacloud/trunk/server/tests/drivers/google/api_test.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/drivers/google/api_test.rb?rev=1199728&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/tests/drivers/google/api_test.rb (added)
+++ incubator/deltacloud/trunk/server/tests/drivers/google/api_test.rb Wed Nov  9 13:00:03
2011
@@ -0,0 +1,35 @@
+$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..')
+require 'tests/common'
+
+module GoogleTest
+
+  class ApiTest < Test::Unit::TestCase
+    include Rack::Test::Methods
+
+    def app
+      Sinatra::Application
+    end
+
+    def test_01_it_returns_entry_points
+      get_auth_url '/api;driver=google/?force_auth=1'
+      (last_xml_response/'/api').first[:driver].should == 'google'
+      (last_xml_response/'/api/link').length.should > 0
+    end
+
+    def test_02_it_has_google_features
+      get_url '/api;driver=google'
+      features = (last_xml_response/'/api/link[@rel="buckets"]/feature').collect { |f| f[:name]
}
+      features.include?('bucket_location').should == true
+      features.length.should == 1
+    end
+
+    def test_03_it_has_google_collections
+      get_url '/api;driver=google'
+      collections = (last_xml_response/'/api/link').collect { |f| f[:rel] }
+      collections.include?('buckets').should == true
+      collections.include?('drivers').should == true
+      collections.length.should == 2
+    end
+
+  end
+end

Added: incubator/deltacloud/trunk/server/tests/drivers/google/buckets_test.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/drivers/google/buckets_test.rb?rev=1199728&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/tests/drivers/google/buckets_test.rb (added)
+++ incubator/deltacloud/trunk/server/tests/drivers/google/buckets_test.rb Wed Nov  9 13:00:03
2011
@@ -0,0 +1,116 @@
+$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..')
+require 'tests/common'
+#require 'webmock/test_unit'
+module GoogleTest
+
+  class BucketsTest < Test::Unit::TestCase
+    include Rack::Test::Methods
+
+    def app
+      Sinatra::Application
+    end
+
+    @@bucket_name_google="#{@@created_bucket_name}googel"
+    @@blob_name_google="#{@@created_blob_name}googel"
+#intentional typos here - bucket names cannot contain 'google'
+#see http://code.google.com/apis/storage/docs/reference/v1/developer-guidev1.html
+
+   def test_01_it_can_create_new_bucket
+      params = {
+        :name => @@bucket_name_google,
+        :'api[driver]' => 'google'
+      }
+      vcr_cassette = stable_vcr_cassette_name('post', '/api/buckets', params)
+      post_url '/api/buckets', params, {'vcr_cassette'=>vcr_cassette}
+      last_response.status.should == 201 # Created
+      bucket = last_xml_response
+      check_bucket_basics(bucket, "googel")
+      (bucket/'bucket/size').first.text.should == "0"
+    end
+
+    def test_02_it_can_post_new_blob
+      temp_file=File.open(@@created_blob_local_file)
+      params = {
+        'blob_id' => @@blob_name_google,
+        :meta_params=>"2",
+        :meta_name1=>"Author",
+        :meta_value1=>"deltacloud",
+        :meta_name2=>"foo",
+        :meta_value2=>"bar",
+        :'api[driver]' => 'google'
+      }
+      uri="/api/buckets/#{@@bucket_name_google}"
+      vcr_cassette = stable_vcr_cassette_name('post', uri, params)
+      params.merge!({'blob_data' => Rack::Test::UploadedFile.new(temp_file.path, "text/html")})
+      post_url uri, params, {'vcr_cassette'=>vcr_cassette}
+      last_response.status.should == 200
+      blob= last_xml_response
+      check_blob_basics(blob, "googel")
+    end
+
+    def test_03_it_can_retrieve_named_bucket_details
+       params = {
+        :'api[driver]' => 'google'
+      }
+      get_url "/api/buckets/#{@@bucket_name_google}", params
+      last_response.status.should == 200
+      bucket = last_xml_response
+      check_bucket_basics(bucket, "googel")
+      (bucket/'bucket/size').first.text.should == "1" #assuming blob created succesfully
right?
+    end
+
+    def test_04_it_can_retrieve_named_blob_details
+      params = {
+                :'api[driver]' => 'google'
+               }
+      get_url "/api/buckets/#{@@bucket_name_google}/#{@@blob_name_google}", params
+      last_response.status.should == 200
+      blob = last_xml_response
+      check_blob_basics(blob, "googel")
+      check_blob_metadata(blob, {"author"=>"deltacloud", "foo"=>"bar"})
+    end
+
+    def test_05_it_can_retrieve_blob_metadata
+      params = {
+                :'api[driver]' => 'google'
+               }
+      head_url "/api/buckets/#{@@bucket_name_google}/#{@@blob_name_google}", params
+      last_response.status.should == 204
+      blob_meta_hash = last_response.headers.inject({}){|result, (k,v)| result[k]=v if k=~/^X-Deltacloud-Blobmeta-/i
; result}
+      blob_meta_hash.gsub_keys(/x-.*meta-/i, "")
+      ({"author"=>"deltacloud", "foo"=>"bar"}.eql?(blob_meta_hash)).should == true
+    end
+
+    def test_06_it_can_update_blob_metadata
+      params = {
+                :'api[driver]' => 'google'
+               }
+      new_meta = {"X-Deltacloud-Blobmeta-author" => "ApacheDeltacloud", "X-Deltacloud-Blobmeta-oof"
=> "rab"}
+      new_meta.each_pair do |k,v|
+        header k, v
+      end
+      post_url "/api/buckets/#{@@bucket_name_google}/#{@@blob_name_google}", params
+      last_response.status.should == 204
+      new_meta.each_pair do |k,v|
+        (last_response.headers[k]==v).should == true
+      end
+    end
+
+    def test_07_it_can_delete_blob
+      params = {
+                :'api[driver]' => 'google'
+               }
+      delete_url "/api/buckets/#{@@bucket_name_google}/#{@@blob_name_google}", params
+      last_response.status.should == 204
+    end
+
+    def test_08_it_can_delete_bucket
+      params = {
+                :'api[driver]' => 'google'
+               }
+      delete_url "/api/buckets/#{@@bucket_name_google}", params
+      last_response.status.should == 204
+    end
+
+  end
+end

Added: incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/delete-997d394df9ccfde81ea3073a68d674f173faa56f.yml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/delete-997d394df9ccfde81ea3073a68d674f173faa56f.yml?rev=1199728&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/delete-997d394df9ccfde81ea3073a68d674f173faa56f.yml
(added)
+++ incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/delete-997d394df9ccfde81ea3073a68d674f173faa56f.yml
Wed Nov  9 13:00:03 2011
@@ -0,0 +1,28 @@
+--- 
+- !ruby/struct:VCR::HTTPInteraction 
+  request: !ruby/struct:VCR::Request 
+    method: DELETE
+    uri: https://testbucki2rpux3wdelmegoogel.commondatastorage.googleapis.com:443/testblobk1ds91kVdelmegoogel
+    body: 
+    headers: 
+      date: 
+      - Tue, 08 Nov 2011 14:45:26 +0000
+      authorization: 
+      - GOOG1 GOOGK7JXLS6UEYS6AYVO:gw0VDJ07/dqbPXtC67B53t7H/fk=
+  response: !ruby/struct:VCR::Response 
+    status: !ruby/struct:VCR::ResponseStatus 
+      code: 204
+      message: 
+    headers: 
+      expires: 
+      - Tue, 08 Nov 2011 14:45:27 GMT
+      server: 
+      - HTTP Upload Server Built on Nov 3 2011 13:52:28 (1320353548)
+      date: 
+      - Tue, 08 Nov 2011 14:45:27 GMT
+      content-length: 
+      - "0"
+      cache-control: 
+      - private, max-age=0
+    body: 
+    http_version: 

Added: incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/delete-fdd72e5f5a3576ca37a34483de5f623c1c08a7f9.yml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/delete-fdd72e5f5a3576ca37a34483de5f623c1c08a7f9.yml?rev=1199728&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/delete-fdd72e5f5a3576ca37a34483de5f623c1c08a7f9.yml
(added)
+++ incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/delete-fdd72e5f5a3576ca37a34483de5f623c1c08a7f9.yml
Wed Nov  9 13:00:03 2011
@@ -0,0 +1,28 @@
+--- 
+- !ruby/struct:VCR::HTTPInteraction 
+  request: !ruby/struct:VCR::Request 
+    method: DELETE
+    uri: https://testbucki2rpux3wdelmegoogel.commondatastorage.googleapis.com:443/
+    body: 
+    headers: 
+      date: 
+      - Tue, 08 Nov 2011 14:45:27 +0000
+      authorization: 
+      - GOOG1 GOOGK7JXLS6UEYS6AYVO:0KUpBpjywaMjTWti4lP0xs1w4aI=
+  response: !ruby/struct:VCR::Response 
+    status: !ruby/struct:VCR::ResponseStatus 
+      code: 204
+      message: 
+    headers: 
+      expires: 
+      - Tue, 08 Nov 2011 14:45:29 GMT
+      server: 
+      - HTTP Upload Server Built on Nov 3 2011 13:52:28 (1320353548)
+      date: 
+      - Tue, 08 Nov 2011 14:45:29 GMT
+      content-length: 
+      - "0"
+      cache-control: 
+      - private, max-age=0
+    body: 
+    http_version: 

Added: incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/get-4c5647f476f144847319d51b3c5cebe0d82b5995.yml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/get-4c5647f476f144847319d51b3c5cebe0d82b5995.yml?rev=1199728&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/get-4c5647f476f144847319d51b3c5cebe0d82b5995.yml
(added)
+++ incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/get-4c5647f476f144847319d51b3c5cebe0d82b5995.yml
Wed Nov  9 13:00:03 2011
@@ -0,0 +1,30 @@
+--- 
+- !ruby/struct:VCR::HTTPInteraction 
+  request: !ruby/struct:VCR::Request 
+    method: GET
+    uri: https://testbucki2rpux3wdelmegoogel.commondatastorage.googleapis.com:443/
+    body: 
+    headers: 
+      date: 
+      - Tue, 08 Nov 2011 14:45:20 +0000
+      authorization: 
+      - GOOG1 GOOGK7JXLS6UEYS6AYVO:L+LQ0Sr12zsqp0vdXpaSh1NRb8o=
+  response: !ruby/struct:VCR::Response 
+    status: !ruby/struct:VCR::ResponseStatus 
+      code: 200
+      message: 
+    headers: 
+      expires: 
+      - Tue, 08 Nov 2011 14:45:21 GMT
+      content-type: 
+      - application/xml; charset=UTF-8
+      server: 
+      - HTTP Upload Server Built on Nov 3 2011 13:52:28 (1320353548)
+      date: 
+      - Tue, 08 Nov 2011 14:45:21 GMT
+      content-length: 
+      - "530"
+      cache-control: 
+      - private, max-age=0
+    body: <?xml version='1.0' encoding='UTF-8'?><ListBucketResult xmlns='http://doc.s3.amazonaws.com/2006-03-01'><Name>testbucki2rpux3wdelmegoogel</Name><Prefix></Prefix><Marker></Marker><IsTruncated>false</IsTruncated><Contents><Key>testblobk1ds91kVdelmegoogel</Key><LastModified>2011-11-08T14:45:19.826Z</LastModified><ETag>"6051b502c4281855ff32dc3e924fe3b0"</ETag><Size>24436</Size><StorageClass>STANDARD</StorageClass><Owner><ID>00b4903a9772c5a80c691066edef0ac07b267f576a2d11bbfc5bf1d2c7a2b8fd</ID></Owner></Contents></ListBucketResult>
+    http_version: 

Added: incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/get-ff2e867e891fe52fd64cd797d594ac100e15b61a.yml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/get-ff2e867e891fe52fd64cd797d594ac100e15b61a.yml?rev=1199728&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/get-ff2e867e891fe52fd64cd797d594ac100e15b61a.yml
(added)
+++ incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/get-ff2e867e891fe52fd64cd797d594ac100e15b61a.yml
Wed Nov  9 13:00:03 2011
@@ -0,0 +1,40 @@
+--- 
+- !ruby/struct:VCR::HTTPInteraction 
+  request: !ruby/struct:VCR::Request 
+    method: HEAD
+    uri: https://testbucki2rpux3wdelmegoogel.commondatastorage.googleapis.com:443/testblobk1ds91kVdelmegoogel
+    body: 
+    headers: 
+      date: 
+      - Tue, 08 Nov 2011 14:45:21 +0000
+      authorization: 
+      - GOOG1 GOOGK7JXLS6UEYS6AYVO:KMG8vTcruwrTS06NrYb4gal1sYE=
+  response: !ruby/struct:VCR::Response 
+    status: !ruby/struct:VCR::ResponseStatus 
+      code: 200
+      message: 
+    headers: 
+      x-goog-meta-foo: 
+      - bar
+      etag: 
+      - "\"6051b502c4281855ff32dc3e924fe3b0\""
+      expires: 
+      - Fri, 01 Jan 1990 00:00:00 GMT
+      last-modified: 
+      - Tue, 08 Nov 2011 14:45:19 GMT
+      content-type: 
+      - text/html
+      server: 
+      - HTTP Upload Server Built on Nov 3 2011 13:52:28 (1320353548)
+      date: 
+      - "1320763522378"
+      x-goog-meta-author: 
+      - deltacloud
+      content-length: 
+      - "24436"
+      cache-control: 
+      - no-cache,no-store,max-age=0,must-revalidate
+      pragma: 
+      - no-cache
+    body: 
+    http_version: 

Added: incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/head-997d394df9ccfde81ea3073a68d674f173faa56f.yml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/head-997d394df9ccfde81ea3073a68d674f173faa56f.yml?rev=1199728&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/head-997d394df9ccfde81ea3073a68d674f173faa56f.yml
(added)
+++ incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/head-997d394df9ccfde81ea3073a68d674f173faa56f.yml
Wed Nov  9 13:00:03 2011
@@ -0,0 +1,40 @@
+--- 
+- !ruby/struct:VCR::HTTPInteraction 
+  request: !ruby/struct:VCR::Request 
+    method: HEAD
+    uri: https://testbucki2rpux3wdelmegoogel.commondatastorage.googleapis.com:443/testblobk1ds91kVdelmegoogel
+    body: 
+    headers: 
+      date: 
+      - Tue, 08 Nov 2011 14:45:22 +0000
+      authorization: 
+      - GOOG1 GOOGK7JXLS6UEYS6AYVO:a6itGMEz19GukbOEwaXcDLIdhoE=
+  response: !ruby/struct:VCR::Response 
+    status: !ruby/struct:VCR::ResponseStatus 
+      code: 200
+      message: 
+    headers: 
+      x-goog-meta-foo: 
+      - bar
+      etag: 
+      - "\"6051b502c4281855ff32dc3e924fe3b0\""
+      expires: 
+      - Fri, 01 Jan 1990 00:00:00 GMT
+      last-modified: 
+      - Tue, 08 Nov 2011 14:45:19 GMT
+      content-type: 
+      - text/html
+      server: 
+      - HTTP Upload Server Built on Nov 3 2011 13:52:28 (1320353548)
+      date: 
+      - "1320763523366"
+      x-goog-meta-author: 
+      - deltacloud
+      content-length: 
+      - "24436"
+      cache-control: 
+      - no-cache,no-store,max-age=0,must-revalidate
+      pragma: 
+      - no-cache
+    body: 
+    http_version: 

Added: incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-9543e39820e2be0b739d4bbdf2a4dd3cb7e4e411.yml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-9543e39820e2be0b739d4bbdf2a4dd3cb7e4e411.yml?rev=1199728&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-9543e39820e2be0b739d4bbdf2a4dd3cb7e4e411.yml
(added)
+++ incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-9543e39820e2be0b739d4bbdf2a4dd3cb7e4e411.yml
Wed Nov  9 13:00:03 2011
@@ -0,0 +1,42 @@
+--- 
+- !ruby/struct:VCR::HTTPInteraction 
+  request: !ruby/struct:VCR::Request 
+    method: PUT
+    uri: https://testbucki2rpux3wdelmegoogel.commondatastorage.googleapis.com:443/testblobk1ds91kVdelmegoogel
+    body: 
+    headers: 
+      x-goog-meta-foo: 
+      - bar
+      content-type: 
+      - text/html
+      x-goog-meta-author: 
+      - deltacloud
+      date: 
+      - Tue, 08 Nov 2011 14:45:17 +0000
+      authorization: 
+      - GOOG1 GOOGK7JXLS6UEYS6AYVO:OkY5lr02ACmmaHJxPyWaiehWVjA=
+      content-length: 
+      - 24436
+  response: !ruby/struct:VCR::Response 
+    status: !ruby/struct:VCR::ResponseStatus 
+      code: 200
+      message: 
+    headers: 
+      etag: 
+      - "\"6051b502c4281855ff32dc3e924fe3b0\""
+      expires: 
+      - Fri, 01 Jan 1990 00:00:00 GMT
+      content-type: 
+      - text/html
+      server: 
+      - HTTP Upload Server Built on Nov 3 2011 13:52:28 (1320353548)
+      date: 
+      - Tue, 08 Nov 2011 14:45:20 GMT
+      content-length: 
+      - "0"
+      cache-control: 
+      - no-cache, no-store, must-revalidate
+      pragma: 
+      - no-cache
+    body: 
+    http_version: 

Added: incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-98ac1bc0a4fd1a04833547a50daed7382fc45ee3.yml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-98ac1bc0a4fd1a04833547a50daed7382fc45ee3.yml?rev=1199728&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-98ac1bc0a4fd1a04833547a50daed7382fc45ee3.yml
(added)
+++ incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-98ac1bc0a4fd1a04833547a50daed7382fc45ee3.yml
Wed Nov  9 13:00:03 2011
@@ -0,0 +1,32 @@
+--- 
+- !ruby/struct:VCR::HTTPInteraction 
+  request: !ruby/struct:VCR::Request 
+    method: PUT
+    uri: https://testbucki2rpux3wdelmegoogel.commondatastorage.googleapis.com:443/
+    body: 
+    headers: 
+      date: 
+      - Tue, 08 Nov 2011 14:45:14 +0000
+      authorization: 
+      - GOOG1 GOOGK7JXLS6UEYS6AYVO:P4NxwWRpcfP1oNOeg6pw+nEV5iw=
+  response: !ruby/struct:VCR::Response 
+    status: !ruby/struct:VCR::ResponseStatus 
+      code: 200
+      message: 
+    headers: 
+      expires: 
+      - Fri, 01 Jan 1990 00:00:00 GMT
+      content-type: 
+      - text/html
+      server: 
+      - HTTP Upload Server Built on Nov 3 2011 13:52:28 (1320353548)
+      date: 
+      - Tue, 08 Nov 2011 14:45:16 GMT
+      content-length: 
+      - "0"
+      cache-control: 
+      - no-cache, no-store, must-revalidate
+      pragma: 
+      - no-cache
+    body: 
+    http_version: 

Added: incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-997d394df9ccfde81ea3073a68d674f173faa56f.yml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-997d394df9ccfde81ea3073a68d674f173faa56f.yml?rev=1199728&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-997d394df9ccfde81ea3073a68d674f173faa56f.yml
(added)
+++ incubator/deltacloud/trunk/server/tests/drivers/google/fixtures/post-997d394df9ccfde81ea3073a68d674f173faa56f.yml
Wed Nov  9 13:00:03 2011
@@ -0,0 +1,42 @@
+--- 
+- !ruby/struct:VCR::HTTPInteraction 
+  request: !ruby/struct:VCR::Request 
+    method: PUT
+    uri: https://testbucki2rpux3wdelmegoogel.commondatastorage.googleapis.com:443/testblobk1ds91kVdelmegoogel
+    body: 
+    headers: 
+      x-goog-meta-oof: 
+      - rab
+      x-goog-copy-source: 
+      - /testbucki2rpux3wdelmegoogel/testblobk1ds91kVdelmegoogel
+      x-goog-meta-author: 
+      - ApacheDeltacloud
+      date: 
+      - Tue, 08 Nov 2011 14:45:23 +0000
+      authorization: 
+      - GOOG1 GOOGK7JXLS6UEYS6AYVO:9YmU6qjJ1RpIQANCrfy6mAUSNv8=
+      x-goog-metadata-directive: 
+      - REPLACE
+  response: !ruby/struct:VCR::Response 
+    status: !ruby/struct:VCR::ResponseStatus 
+      code: 200
+      message: 
+    headers: 
+      etag: 
+      - "\"6051b502c4281855ff32dc3e924fe3b0\""
+      expires: 
+      - Fri, 01 Jan 1990 00:00:00 GMT
+      content-type: 
+      - text/html
+      server: 
+      - HTTP Upload Server Built on Nov 3 2011 13:52:28 (1320353548)
+      date: 
+      - Tue, 08 Nov 2011 14:45:26 GMT
+      content-length: 
+      - "175"
+      cache-control: 
+      - no-cache, no-store, must-revalidate
+      pragma: 
+      - no-cache
+    body: <?xml version='1.0' encoding='UTF-8'?><CopyObjectResult><LastModified>2011-11-08T14:45:19.826Z</LastModified><ETag>"6051b502c4281855ff32dc3e924fe3b0"</ETag></CopyObjectResult>
+    http_version: 

Added: incubator/deltacloud/trunk/server/tests/drivers/google/setup.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/tests/drivers/google/setup.rb?rev=1199728&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/tests/drivers/google/setup.rb (added)
+++ incubator/deltacloud/trunk/server/tests/drivers/google/setup.rb Wed Nov  9 13:00:03 2011
@@ -0,0 +1,13 @@
+ENV['API_DRIVER']   = "google"
+ENV['API_USER']     = 'GOOGK7JXLS6UEYS6AYVO'
+ENV['API_PASSWORD'] = 'QjxUunLgszKhBGn/LISQajGR82CfwvraxA9lqnkg'
+
+require 'vcr'
+
+DeltacloudTestCommon::record!
+
+VCR.config do |c|
+  c.cassette_library_dir = "#{File.dirname(__FILE__)}/fixtures/"
+  c.stub_with :excon
+  c.default_cassette_options = { :record => :new_episodes}
+end



Mime
View raw message