diff options
author | Nick Thomas <nick@gitlab.com> | 2019-08-29 20:17:30 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-09-10 15:45:21 +0300 |
commit | 07323f44b74592e0991c5d3096e7fd0ca260fbab (patch) | |
tree | e9aae29c90354da8f3b9bb921fc2a2ac3860d741 /spec/lib/gitlab/repository_cache_adapter_spec.rb | |
parent | 6ce21a9c1712c4c64b628fd65207c2f8eb7fc39d (diff) |
Revert "Revert "Cache branch and tag names as Redis sets""
This reverts commit c6ccc07f48c7c1f9da43ecd82015500a4340544d.
Diffstat (limited to 'spec/lib/gitlab/repository_cache_adapter_spec.rb')
-rw-r--r-- | spec/lib/gitlab/repository_cache_adapter_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/lib/gitlab/repository_cache_adapter_spec.rb b/spec/lib/gitlab/repository_cache_adapter_spec.rb index 808eb865a21..fd1338b55a6 100644 --- a/spec/lib/gitlab/repository_cache_adapter_spec.rb +++ b/spec/lib/gitlab/repository_cache_adapter_spec.rb @@ -6,6 +6,7 @@ describe Gitlab::RepositoryCacheAdapter do let(:project) { create(:project, :repository) } let(:repository) { project.repository } let(:cache) { repository.send(:cache) } + let(:redis_set_cache) { repository.send(:redis_set_cache) } describe '#cache_method_output', :use_clean_rails_memory_store_caching do let(:fallback) { 10 } @@ -208,9 +209,11 @@ describe Gitlab::RepositoryCacheAdapter do describe '#expire_method_caches' do it 'expires the caches of the given methods' do expect(cache).to receive(:expire).with(:rendered_readme) - expect(cache).to receive(:expire).with(:gitignore) + expect(cache).to receive(:expire).with(:branch_names) + expect(redis_set_cache).to receive(:expire).with(:rendered_readme) + expect(redis_set_cache).to receive(:expire).with(:branch_names) - repository.expire_method_caches(%i(rendered_readme gitignore)) + repository.expire_method_caches(%i(rendered_readme branch_names)) end it 'does not expire caches for non-existent methods' do |