Commit 487c3ae9 authored by Alishan Ladhani's avatar Alishan Ladhani

Hardcode object storage settings

- direct_upload is false because files need to be encrypted before
  uploading
- background_upload is false because files need to be available
  immediately
- proxy_download is true because downloads need to be decrypted
  before being sent to the user
parent a33f0126
......@@ -21,4 +21,18 @@ class TerraformStateUploader < GitlabUploader
def key
OpenSSL::HMAC.digest('SHA256', Gitlab::Application.secrets.db_key_base, project_id.to_s)
end
class << self
def direct_upload_enabled?
false
end
def background_upload_enabled?
false
end
def proxy_download_enabled?
true
end
end
end
......@@ -43,4 +43,22 @@ describe TerraformStateUploader do
expect(subject.read).to eq(fixture_file('terraform.tfstate'))
end
end
describe '.direct_upload_enabled?' do
it 'returns false' do
expect(described_class.direct_upload_enabled?).to eq(false)
end
end
describe '.background_upload_enabled?' do
it 'returns false' do
expect(described_class.background_upload_enabled?).to eq(false)
end
end
describe '.proxy_download_enabled?' do
it 'returns true' do
expect(described_class.proxy_download_enabled?).to eq(true)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment