From eb63889f7cee9ed8f29743330fc793a25db8e50d Mon Sep 17 00:00:00 2001 From: Bob Van Landuyt Date: Thu, 21 Sep 2017 16:07:40 +0200 Subject: Don't memoize storage configuration on `FsShardsCheck` These values are already coming from memory, so we don't need to memoize. If we do memoize these, than the would not be stubbed when calling `stub_storage_settings` in specs --- lib/gitlab/health_checks/fs_shards_check.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gitlab/health_checks/fs_shards_check.rb b/lib/gitlab/health_checks/fs_shards_check.rb index a533d4364ef..a1905b091b4 100644 --- a/lib/gitlab/health_checks/fs_shards_check.rb +++ b/lib/gitlab/health_checks/fs_shards_check.rb @@ -58,11 +58,11 @@ module Gitlab end def repository_storages - @repository_storage ||= storages_paths.keys + storages_paths.keys end def storages_paths - @storage_paths ||= Gitlab.config.repositories.storages + Gitlab.config.repositories.storages end def exec_with_timeout(cmd_args, *args, &block) -- cgit v1.2.1