diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-06-28 11:39:29 +0200 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-06-30 16:17:38 +0200 |
commit | 5fe85bc8cae98d6996907fd5ce86760b72319306 (patch) | |
tree | 8e1cd4655027a87dc242efb6050e674e5d5aba21 /spec/services/git_tag_push_service_spec.rb | |
parent | 99e5ae10bebfcb8e26117426bb773fcd531c45f1 (diff) | |
download | gitlab-ce-5fe85bc8cae98d6996907fd5ce86760b72319306.tar.gz |
Expire branch/tag git data when needed.18709-branch-tag-collection-caching
When pushing commits to existing branches we don’t
need to flush branch git data (branch names / counts)
When flushes the cache when pushing commits skip to
flush branch and tag git data (names / counts) because
those operations are managed explicitly in each case
Repopulated expired cache as soon as possible
Diffstat (limited to 'spec/services/git_tag_push_service_spec.rb')
-rw-r--r-- | spec/services/git_tag_push_service_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/services/git_tag_push_service_spec.rb b/spec/services/git_tag_push_service_spec.rb index a63656e6268..a4fcd44882d 100644 --- a/spec/services/git_tag_push_service_spec.rb +++ b/spec/services/git_tag_push_service_spec.rb @@ -11,6 +11,31 @@ describe GitTagPushService, services: true do let(:newrev) { "8a2a6eb295bb170b34c24c76c49ed0e9b2eaf34b" } # gitlab-test: git rev-parse refs/tags/v1.1.0 let(:ref) { 'refs/tags/v1.1.0' } + describe "Push tags" do + subject do + service.execute + service + end + + it 'flushes general cached data' do + expect(project.repository).to receive(:expire_cache) + + subject + end + + it 'flushes the tags cache' do + expect(project.repository).to receive(:expire_tags_cache) + + subject + end + + it 'flushes the tag count cache' do + expect(project.repository).to receive(:expire_tag_count_cache) + + subject + end + end + describe "Git Tag Push Data" do before do service.execute |