Commit f84fae13 authored by Dylan Griffith's avatar Dylan Griffith Committed by Stan Hu

Rename #timeouted -> #timed_out

parent a1c216e5
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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)
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment