summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2019-04-29 15:57:12 +1000
committerStan Hu <stanhu@gmail.com>2019-04-29 22:55:13 -0700
commitf84fae1386eec1b22c1405a8b87beb30d8f10519 (patch)
treea5c43d8c0e6bf7cc007749a7a650727cc22f46b0
parenta1c216e5e4f566b762e185ad36bf566f14268cba (diff)
downloadgitlab-ce-f84fae1386eec1b22c1405a8b87beb30d8f10519.tar.gz
Rename #timeouted -> #timed_out
-rw-r--r--app/services/clusters/applications/check_installation_progress_service.rb4
-rw-r--r--app/services/clusters/applications/check_uninstall_progress_service.rb4
-rw-r--r--spec/factories/clusters/applications/helm.rb2
-rw-r--r--spec/services/clusters/applications/check_installation_progress_service_spec.rb6
-rw-r--r--spec/services/clusters/applications/check_uninstall_progress_service_spec.rb4
-rw-r--r--spec/support/shared_examples/models/cluster_application_status_shared_examples.rb2
6 files changed, 11 insertions, 11 deletions
diff --git a/app/services/clusters/applications/check_installation_progress_service.rb b/app/services/clusters/applications/check_installation_progress_service.rb
index c592d608b89..ae4b86a0614 100644
--- a/app/services/clusters/applications/check_installation_progress_service.rb
+++ b/app/services/clusters/applications/check_installation_progress_service.rb
@@ -37,7 +37,7 @@ module Clusters
end
def check_timeout
- if timeouted?
+ if timed_out?
begin
app.make_errored!("Operation timed out. Check pod logs for #{pod_name} for more details.")
end
@@ -51,7 +51,7 @@ module Clusters
install_command.pod_name
end
- def timeouted?
+ def timed_out?
Time.now.utc - app.updated_at.to_time.utc > ClusterWaitForAppInstallationWorker::TIMEOUT
end
diff --git a/app/services/clusters/applications/check_uninstall_progress_service.rb b/app/services/clusters/applications/check_uninstall_progress_service.rb
index 663e4b1daef..022cc754af9 100644
--- a/app/services/clusters/applications/check_uninstall_progress_service.rb
+++ b/app/services/clusters/applications/check_uninstall_progress_service.rb
@@ -35,7 +35,7 @@ module Clusters
end
def check_timeout
- if timeouted?
+ if timed_out?
app.make_errored!("Operation timed out. Check pod logs for #{pod_name} for more details.")
else
WaitForUninstallAppWorker.perform_in(WaitForUninstallAppWorker::INTERVAL, app.name, app.id)
@@ -46,7 +46,7 @@ module Clusters
app.uninstall_command.pod_name
end
- def timeouted?
+ def timed_out?
Time.now.utc - app.updated_at.to_time.utc > WaitForUninstallAppWorker::TIMEOUT
end
diff --git a/spec/factories/clusters/applications/helm.rb b/spec/factories/clusters/applications/helm.rb
index 22a0888947e..d78f01828d7 100644
--- a/spec/factories/clusters/applications/helm.rb
+++ b/spec/factories/clusters/applications/helm.rb
@@ -49,7 +49,7 @@ FactoryBot.define do
status_reason 'something went wrong'
end
- trait :timeouted do
+ trait :timed_out do
installing
updated_at { ClusterWaitForAppInstallationWorker::TIMEOUT.ago }
end
diff --git a/spec/services/clusters/applications/check_installation_progress_service_spec.rb b/spec/services/clusters/applications/check_installation_progress_service_spec.rb
index 8ad90aaf720..a54bd85a11a 100644
--- a/spec/services/clusters/applications/check_installation_progress_service_spec.rb
+++ b/spec/services/clusters/applications/check_installation_progress_service_spec.rb
@@ -18,7 +18,7 @@ describe Clusters::Applications::CheckInstallationProgressService, '#execute' do
end
context "when phase is #{a_phase}" do
- context 'when not timeouted' do
+ context 'when not timed_out' do
it 'reschedule a new check' do
expect(ClusterWaitForAppInstallationWorker).to receive(:perform_in).once
expect(service).not_to receive(:remove_installation_pod)
@@ -113,7 +113,7 @@ describe Clusters::Applications::CheckInstallationProgressService, '#execute' do
end
context 'when timed out' do
- let(:application) { create(:clusters_applications_helm, :timeouted, :updating) }
+ let(:application) { create(:clusters_applications_helm, :timed_out, :updating) }
before do
expect(service).to receive(:installation_phase).once.and_return(phase)
@@ -174,7 +174,7 @@ describe Clusters::Applications::CheckInstallationProgressService, '#execute' do
end
context 'when timed out' do
- let(:application) { create(:clusters_applications_helm, :timeouted) }
+ let(:application) { create(:clusters_applications_helm, :timed_out) }
before do
expect(service).to receive(:installation_phase).once.and_return(phase)
diff --git a/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb b/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb
index 8ff92eb2d09..d0730399268 100644
--- a/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb
+++ b/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb
@@ -24,7 +24,7 @@ describe Clusters::Applications::CheckUninstallProgressService do
end
context "when phase is #{a_phase}" do
- context 'when not timeouted' do
+ context 'when not timed_out' do
it 'reschedule a new check' do
expect(worker_class).to receive(:perform_in).once
expect(service).not_to receive(:remove_installation_pod)
@@ -100,7 +100,7 @@ describe Clusters::Applications::CheckUninstallProgressService do
end
context 'when timed out' do
- let(:application) { create(:clusters_applications_prometheus, :timeouted, :uninstalling) }
+ let(:application) { create(:clusters_applications_prometheus, :timed_out, :uninstalling) }
before do
expect(service).to receive(:installation_phase).once.and_return(phase)
diff --git a/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb b/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
index 233b9db8f7b..4525c03837f 100644
--- a/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
+++ b/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
@@ -209,7 +209,7 @@ shared_examples 'cluster application status specs' do |application_name|
:update_errored | false
:uninstalling | false
:uninstall_errored | false
- :timeouted | false
+ :timed_out | false
end
with_them do