Extract EE specific files/lines for Create spec/workers

We have the following files containing EE specific code. We should move them to ee/

spec/workers/project_cache_worker_spec.rb
diff --git a/spec/workers/project_cache_worker_spec.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/workers/project_cache_worker_spec.rb
index b9b5445562f..a69aacd9441 100644
--- a/spec/workers/project_cache_worker_spec.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/workers/project_cache_worker_spec.rb
@@ -49,6 +49,22 @@ describe ProjectCacheWorker do
         worker.perform(project.id, %w(readme))
       end
 
+      context 'when in Geo secondary node' do
+        before do
+          allow(Gitlab::Geo).to receive(:secondary?).and_return(true)
+        end
+
+        it 'updates only non database cache' do
+          expect_any_instance_of(Repository).to receive(:refresh_method_caches)
+            .and_call_original
+
+          expect_any_instance_of(Project).not_to receive(:update_repository_size)
+          expect_any_instance_of(Project).not_to receive(:update_commit_count)
+
+          worker.perform(project.id, %w(readme))
+        end
+      end
+
       context 'with plain readme' do
         it 'refreshes the method caches' do
           allow(MarkupHelper).to receive(:gitlab_markdown?).and_return(false)
Edited Mar 01, 2019 by Douwe Maan
Assignee Loading
Time tracking Loading