@@ -384,57 +384,6 @@ def upload_tmpfile(client, key='abcdef')
384384 end
385385 end
386386
387- context 'gcp' do
388- let ( :gcp_connection_config ) do
389- {
390- provider : 'Google' ,
391- google_project : 'gcs_project' ,
392- google_client_email : 'gcs_service_account_email' ,
393- google_json_key_string : 'gcs_service_account_json_key'
394- }
395- end
396-
397- context 'when uniform flag is specified' do
398- let ( :client_with_encryption ) do
399- FogClient . new ( connection_config : gcp_connection_config ,
400- directory_key : directory_key ,
401- gcp_storage_options : { uniform : false , other : 'thing' } )
402- end
403-
404- it 'passes the storage options to gcp' do
405- path = File . join ( local_dir , 'empty_file.png' )
406- FileUtils . touch ( path )
407-
408- client_with_encryption . cp_to_blobstore ( path , 'abcdef123456' )
409-
410- expect ( files ) . to have_received ( :create ) . with ( key : anything ,
411- body : anything ,
412- content_type : anything ,
413- public : anything ,
414- uniform : false ,
415- other : 'thing' )
416- end
417- end
418-
419- context 'when gcp uniform flag is not specified' do
420- let ( :client_with_encryption ) do
421- FogClient . new ( connection_config : gcp_connection_config ,
422- directory_key : directory_key )
423- end
424-
425- it 'has empty storage options' do
426- path = File . join ( local_dir , 'empty_file.png' )
427- FileUtils . touch ( path )
428-
429- client_with_encryption . cp_to_blobstore ( path , 'abcdef123456' )
430-
431- expect ( files ) . to have_received ( :create ) . with ( key : anything ,
432- body : anything ,
433- content_type : anything ,
434- public : anything )
435- end
436- end
437- end
438387 end
439388 end
440389
0 commit comments