diff options
author | Vladimir Shushlin <vshushlin@gitlab.com> | 2019-05-31 08:22:55 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-05-31 08:22:55 +0300 |
commit | 39e21fb2661693fed914012a39fb3a53b2b687c2 (patch) | |
tree | 70a5fdd93cea81aed9c1638bc32513a1fdf84bb7 /spec/migrations | |
parent | c8c08d326942f30ad87d0702cc8b9c5896d296ad (diff) |
Generate lets_encrypt_private_key on the fly
Remove migration generating lets encrypt key
Don't generate private_key if database is readonly
For reference:
This reverts commit 988a7f70489b99383b95e9f271a2caf6bb5b3a44.
This reverts commit 21acbe531592d55caf0e5b8716a3b551dafd6233.
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/generate_lets_encrypt_private_key_spec.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/spec/migrations/generate_lets_encrypt_private_key_spec.rb b/spec/migrations/generate_lets_encrypt_private_key_spec.rb index f47cc0c36ef..773bf5222f0 100644 --- a/spec/migrations/generate_lets_encrypt_private_key_spec.rb +++ b/spec/migrations/generate_lets_encrypt_private_key_spec.rb @@ -3,17 +3,9 @@ require Rails.root.join('db', 'migrate', '20190524062810_generate_lets_encrypt_p describe GenerateLetsEncryptPrivateKey, :migration do describe '#up' do - let(:applications_settings) { table(:applications_settings) } - - it 'generates RSA private key and saves it in application settings' do - application_setting = described_class::ApplicationSetting.create! - - described_class.new.up - application_setting.reload - - expect(application_setting.lets_encrypt_private_key).to be_present + it 'does not fail' do expect do - OpenSSL::PKey::RSA.new(application_setting.lets_encrypt_private_key) + described_class.new.up end.not_to raise_error end end |