Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-18 03:08:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-18 03:08:13 +0300
commitc65a2b8a6ce8e1147b738bca02be68f6401bee70 (patch)
tree868652e846467969d7cf9a068f61ab4f7574803f /spec/initializers/secret_token_spec.rb
parent0da9e7b27aef7c9bc3e67ccc65e32cb591b40224 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/initializers/secret_token_spec.rb')
-rw-r--r--spec/initializers/secret_token_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/initializers/secret_token_spec.rb b/spec/initializers/secret_token_spec.rb
index c29f46e7779..b7979144c72 100644
--- a/spec/initializers/secret_token_spec.rb
+++ b/spec/initializers/secret_token_spec.rb
@@ -7,9 +7,8 @@ describe 'create_tokens' do
include StubENV
let(:secrets) { ActiveSupport::OrderedOptions.new }
-
- HEX_KEY = /\h{128}/.freeze
- RSA_KEY = /\A-----BEGIN RSA PRIVATE KEY-----\n.+\n-----END RSA PRIVATE KEY-----\n\Z/m.freeze
+ let(:hex_key) { /\h{128}/.freeze }
+ let(:rsa_key) { /\A-----BEGIN RSA PRIVATE KEY-----\n.+\n-----END RSA PRIVATE KEY-----\n\Z/m.freeze }
before do
allow(File).to receive(:write)
@@ -35,7 +34,7 @@ describe 'create_tokens' do
keys = secrets.values_at(:secret_key_base, :otp_key_base, :db_key_base)
expect(keys.uniq).to eq(keys)
- expect(keys).to all(match(HEX_KEY))
+ expect(keys).to all(match(hex_key))
end
it 'generates an RSA key for openid_connect_signing_key' do
@@ -44,7 +43,7 @@ describe 'create_tokens' do
keys = secrets.values_at(:openid_connect_signing_key)
expect(keys.uniq).to eq(keys)
- expect(keys).to all(match(RSA_KEY))
+ expect(keys).to all(match(rsa_key))
end
it 'warns about the secrets to add to secrets.yml' do