Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-02-23 01:08:12 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-02-23 01:10:14 +0300
commit3b320d675fe058311d921e26cd89b2e703310b21 (patch)
treec8135b9041f238bc2d435fea26cf3c3dd6940cd8 /spec/models/clusters
parent17e85dacdd73b51a173d1f4c5efea5e20ee8c55b (diff)
Simplify retrying for ClusterWaitForIngressIpAddressWorker and style changes
(#42643)
Diffstat (limited to 'spec/models/clusters')
-rw-r--r--spec/models/clusters/applications/ingress_spec.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/models/clusters/applications/ingress_spec.rb b/spec/models/clusters/applications/ingress_spec.rb
index ced5a4ee4d5..80c450c30cb 100644
--- a/spec/models/clusters/applications/ingress_spec.rb
+++ b/spec/models/clusters/applications/ingress_spec.rb
@@ -6,6 +6,7 @@ describe Clusters::Applications::Ingress do
before do
allow(ClusterWaitForIngressIpAddressWorker).to receive(:perform_in)
+ allow(ClusterWaitForIngressIpAddressWorker).to receive(:perform_async)
end
include_examples 'cluster application specs', described_class
@@ -23,23 +24,23 @@ describe Clusters::Applications::Ingress do
end
end
- describe '#sync_details' do
+ describe '#schedule_status_update' do
let(:application) { create(:clusters_applications_ingress, :installed) }
before do
- application.sync_details
+ application.schedule_status_update
end
it 'schedules a ClusterWaitForIngressIpAddressWorker' do
- expect(ClusterWaitForIngressIpAddressWorker).to have_received(:perform_in)
- .with(ClusterWaitForIngressIpAddressWorker::INTERVAL, 'ingress', application.id, 3)
+ expect(ClusterWaitForIngressIpAddressWorker).to have_received(:perform_async)
+ .with('ingress', application.id, 3)
end
context 'when the application is not installed' do
let(:application) { create(:clusters_applications_ingress, :installing) }
it 'does not schedule a ClusterWaitForIngressIpAddressWorker' do
- expect(ClusterWaitForIngressIpAddressWorker).not_to have_received(:perform_in)
+ expect(ClusterWaitForIngressIpAddressWorker).not_to have_received(:perform_async)
end
end