summaryrefslogtreecommitdiff
path: root/spec/workers/cluster_update_app_worker_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 15:07:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 15:07:45 +0000
commit1219a9dce91f4edbc135dfc08299b4122b4825a8 (patch)
treee7d12a55d75a2d56e60d9527bef3724e3578866d /spec/workers/cluster_update_app_worker_spec.rb
parent1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae (diff)
downloadgitlab-ce-1219a9dce91f4edbc135dfc08299b4122b4825a8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/cluster_update_app_worker_spec.rb')
-rw-r--r--spec/workers/cluster_update_app_worker_spec.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/workers/cluster_update_app_worker_spec.rb b/spec/workers/cluster_update_app_worker_spec.rb
index d91104334e5..5391c194679 100644
--- a/spec/workers/cluster_update_app_worker_spec.rb
+++ b/spec/workers/cluster_update_app_worker_spec.rb
@@ -52,6 +52,8 @@ describe ClusterUpdateAppWorker do
let(:lease_key) { "#{described_class.name.underscore}-#{application.id}" }
before do
+ # update_highest_role uses exclusive key too:
+ allow(Gitlab::ExclusiveLease).to receive(:new).and_call_original
stub_exclusive_lease_taken(lease_key)
end
@@ -62,8 +64,6 @@ describe ClusterUpdateAppWorker do
end
it 'does not allow same app to be updated concurrently by different project', :aggregate_failures do
- stub_exclusive_lease("refresh_authorized_projects:#{user.id}")
- stub_exclusive_lease("update_highest_role:#{user.id}")
project1 = create(:project, namespace: create(:namespace, owner: user))
expect(Clusters::Applications::PrometheusUpdateService).not_to receive(:new)
@@ -87,8 +87,6 @@ describe ClusterUpdateAppWorker do
application2 = create(:clusters_applications_prometheus, :installed)
lease_key2 = "#{described_class.name.underscore}-#{application2.id}"
- stub_exclusive_lease("refresh_authorized_projects:#{user.id}")
- stub_exclusive_lease("update_highest_role:#{user.id}")
project2 = create(:project, namespace: create(:namespace, owner: user))
stub_exclusive_lease(lease_key2)