Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

Commit a79b7ae

Browse files
committed
Fixes #9897 - Stub encryption key in registry test
Currently CI is broken as it needs the encryption key to be set. In the past core provided a key for the Rails test environment but that's no longer the case
1 parent d0846a1 commit a79b7ae

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/units/docker_registry_test.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ class DockerRegistryTest < ActiveSupport::TestCase
1818
end
1919

2020
test 'password is stored encrypted' do
21-
registry = as_admin { FactoryGirl.create(:docker_registry) }
21+
registry = as_admin { FactoryGirl.build(:docker_registry) }
22+
registry.password = 'encrypted-whatever'
23+
DockerRegistry.any_instance.expects(:encryption_key).at_least_once.returns('fakeencryptionkey')
2224
assert registry.is_decryptable?(registry.password_in_db)
2325
end
2426

0 commit comments

Comments
 (0)