diff options
Diffstat (limited to 'spec/lib/gitlab/encrypted_configuration_spec.rb')
-rw-r--r-- | spec/lib/gitlab/encrypted_configuration_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/encrypted_configuration_spec.rb b/spec/lib/gitlab/encrypted_configuration_spec.rb index eadc2cf71a7..95e6d99f41c 100644 --- a/spec/lib/gitlab/encrypted_configuration_spec.rb +++ b/spec/lib/gitlab/encrypted_configuration_spec.rb @@ -56,7 +56,7 @@ RSpec.describe Gitlab::EncryptedConfiguration do describe '#write' do it 'encrypts the file using the provided key' do - encryptor = ActiveSupport::MessageEncryptor.new(Gitlab::EncryptedConfiguration.generate_key(credentials_key), cipher: 'aes-256-gcm') + encryptor = ActiveSupport::MessageEncryptor.new(described_class.generate_key(credentials_key), cipher: 'aes-256-gcm') config = described_class.new(content_path: credentials_config_path, base_key: credentials_key) config.write('sample-content') @@ -122,7 +122,7 @@ RSpec.describe Gitlab::EncryptedConfiguration do original_key_encryptor = encryptor(credential_key_original) # can read with the initial key latest_key_encryptor = encryptor(credential_key_latest) # can read with the new key both_key_encryptor = encryptor(credential_key_latest) # can read with either key - both_key_encryptor.rotate(Gitlab::EncryptedConfiguration.generate_key(credential_key_original)) + both_key_encryptor.rotate(described_class.generate_key(credential_key_original)) expect(original_key_encryptor.decrypt_and_verify(File.read(config_path_original))).to eq('sample-content1') expect(both_key_encryptor.decrypt_and_verify(File.read(config_path_original))).to eq('sample-content1') |