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-20 04:42:05 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-02-20 04:47:07 +0300
commitba4114d25f538d198df2f681b9cb08567494207e (patch)
tree876cf5b44ab81b25cdf30acb9ebd642778800615 /spec/models/clusters
parentf0b27f9b406579a03e55fa16cbc7095009dc8c2b (diff)
Refactor ingress IP address waiting code (#42643)
Diffstat (limited to 'spec/models/clusters')
-rw-r--r--spec/models/clusters/applications/ingress_spec.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/models/clusters/applications/ingress_spec.rb b/spec/models/clusters/applications/ingress_spec.rb
index da9535f9d16..c8109bf3cf6 100644
--- a/spec/models/clusters/applications/ingress_spec.rb
+++ b/spec/models/clusters/applications/ingress_spec.rb
@@ -4,16 +4,19 @@ describe Clusters::Applications::Ingress do
it { is_expected.to belong_to(:cluster) }
it { is_expected.to validate_presence_of(:cluster) }
- include_examples 'cluster application specs', described_class
+ before do
+ allow(ClusterWaitForIngressIpAddressWorker).to receive(:perform_in)
+ end
- describe '#post_install' do
- let(:application) { create(:clusters_applications_ingress, :installed) }
+ include_examples 'cluster application specs', described_class
+ describe '#make_installed!' do
before do
- allow(ClusterWaitForIngressIpAddressWorker).to receive(:perform_in)
- application.post_install
+ application.make_installed!
end
+ let(:application) { create(:clusters_applications_ingress, :installing) }
+
it 'schedules a ClusterWaitForIngressIpAddressWorker' do
expect(ClusterWaitForIngressIpAddressWorker).to have_received(:perform_in)
.with(ClusterWaitForIngressIpAddressWorker::INTERVAL, 'ingress', application.id, 3)