diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-09-21 16:07:40 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-09-21 16:15:08 +0200 |
commit | eb63889f7cee9ed8f29743330fc793a25db8e50d (patch) | |
tree | cb7a45c2f133d094818ac556cbfc2204226c7e8d | |
parent | cfccb2785fb8b98a013170aae4b931e9431739d1 (diff) | |
download | gitlab-ce-eb63889f7cee9ed8f29743330fc793a25db8e50d.tar.gz |
Don't memoize storage configuration on `FsShardsCheck`bvl-transient-failure-health-controller-spec
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
-rw-r--r-- | lib/gitlab/health_checks/fs_shards_check.rb | 4 |
1 files 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) |