Skip to content

Commit 8ce0a7f

Browse files
committed
Remove fog_gcp_storage_options from config and test fixtures
1 parent 8add09e commit 8ce0a7f

5 files changed

Lines changed: 2 additions & 89 deletions

File tree

config/cloud_controller.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ resource_pool:
184184
blobstore_type: local-temp-storage
185185
fog_connection: {}
186186
fog_aws_storage_options: {}
187-
fog_gcp_storage_options: {}
188187

189188
packages:
190189
app_package_directory_key: "cc-packages"
@@ -193,22 +192,19 @@ packages:
193192
blobstore_type: local-temp-storage
194193
fog_connection: {}
195194
fog_aws_storage_options: {}
196-
fog_gcp_storage_options: {}
197195

198196
droplets:
199197
droplet_directory_key: cc-droplets
200198
max_staged_droplets_stored: 42
201199
blobstore_type: local-temp-storage
202200
fog_connection: {}
203201
fog_aws_storage_options: {}
204-
fog_gcp_storage_options: {}
205202

206203
buildpacks:
207204
buildpack_directory_key: cc-buildpacks
208205
blobstore_type: local-temp-storage
209206
fog_connection: {}
210207
fog_aws_storage_options: {}
211-
fog_gcp_storage_options: {}
212208

213209
db_encryption_key: "asdfasdfasdf"
214210
database_encryption:

spec/fixtures/config/port_8181_config.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,22 +142,18 @@ resource_pool:
142142
maximum_size: 42
143143
minimum_size: 1
144144
fog_aws_storage_options: {}
145-
fog_gcp_storage_options: {}
146145

147146
buildpacks:
148147
fog_aws_storage_options: {}
149-
fog_gcp_storage_options: {}
150148

151149
packages:
152150
max_package_size: 42
153151
max_valid_packages_stored: 42
154152
fog_aws_storage_options: {}
155-
fog_gcp_storage_options: {}
156153

157154
droplets:
158155
max_staged_droplets_stored: 42
159156
fog_aws_storage_options: {}
160-
fog_gcp_storage_options: {}
161157

162158
request_timeout_in_seconds: 600
163159
skip_cert_verify: true
@@ -181,28 +177,24 @@ resource_pool:
181177
minimum_size: 1
182178
fog_connection: {}
183179
fog_aws_storage_options: {}
184-
fog_gcp_storage_options: {}
185180

186181
buildpacks:
187182
buildpack_directory_key: ''
188183
fog_connection: {}
189184
fog_aws_storage_options: {}
190-
fog_gcp_storage_options: {}
191185

192186
packages:
193187
app_package_directory_key: ''
194188
max_package_size: 42
195189
max_valid_packages_stored: 42
196190
fog_connection: {}
197191
fog_aws_storage_options: {}
198-
fog_gcp_storage_options: {}
199192

200193
droplets:
201194
droplet_directory_key: ''
202195
max_staged_droplets_stored: 42
203196
fog_connection: {}
204197
fog_aws_storage_options: {}
205-
fog_gcp_storage_options: {}
206198

207199

208200

spec/unit/lib/cloud_controller/blobstore/client_provider_spec.rb

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ module Blobstore
4646
root_dir: anything,
4747
min_size: anything,
4848
max_size: anything,
49-
aws_storage_options: { encryption: 'my organic algo' },
50-
gcp_storage_options: anything)
49+
aws_storage_options: { encryption: 'my organic algo' })
5150
end
5251

5352
context 'fog methods' do
@@ -63,25 +62,6 @@ module Blobstore
6362
end
6463
end
6564

66-
context 'when a gcp uniform option is requested' do
67-
before do
68-
options.merge!(fog_gcp_storage_options: { uniform: false })
69-
end
70-
71-
it 'passes the specified uniform option to the fog client' do
72-
allow(FogClient).to receive(:new).and_call_original
73-
ClientProvider.provide(options: options, directory_key: 'key')
74-
expect(FogClient).to have_received(:new).with(connection_config: anything,
75-
directory_key: anything,
76-
cdn: anything,
77-
root_dir: anything,
78-
min_size: anything,
79-
max_size: anything,
80-
aws_storage_options: anything,
81-
gcp_storage_options: { uniform: false })
82-
end
83-
end
84-
8565
context 'when a cdn is requested in the options' do
8666
before do
8767
options.merge!(cdn: { uri: 'http://cdn.com' })
@@ -96,8 +76,7 @@ module Blobstore
9676
root_dir: anything,
9777
min_size: anything,
9878
max_size: anything,
99-
aws_storage_options: anything,
100-
gcp_storage_options: anything)
79+
aws_storage_options: anything)
10180
end
10281
end
10382

spec/unit/lib/cloud_controller/blobstore/fog/fog_client_spec.rb

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -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

spec/unit/lib/cloud_controller/config_spec.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ module VCAP::CloudController
99
fog_aws_storage_options: {
1010
encryption: 'AES256'
1111
},
12-
fog_gcp_storage_options: {},
1312
app_package_directory_key: 'app_key'
1413
},
1514
droplets: {
@@ -389,7 +388,6 @@ module VCAP::CloudController
389388
fog_aws_storage_options: {
390389
encryption: 'AES256'
391390
},
392-
fog_gcp_storage_options: {},
393391
app_package_directory_key: 'app_key'
394392
},
395393
droplets: {
@@ -552,7 +550,6 @@ module VCAP::CloudController
552550
fog_aws_storage_options: {
553551
encryption: 'AES256'
554552
},
555-
fog_gcp_storage_options: {},
556553
app_package_directory_key: 'app_key'
557554
})
558555
expect(config_instance.get(:packages, :fog_aws_storage_options)).to eq(encryption: 'AES256')

0 commit comments

Comments
 (0)