diff options
Diffstat (limited to 'spec/services/clusters/applications')
4 files changed, 7 insertions, 4 deletions
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 02fd4b63c89..335397ee9f5 100644 --- a/spec/services/clusters/applications/check_installation_progress_service_spec.rb +++ b/spec/services/clusters/applications/check_installation_progress_service_spec.rb @@ -76,6 +76,7 @@ describe Clusters::Applications::CheckInstallationProgressService, '#execute' do context 'when installation POD succeeded' do let(:phase) { Gitlab::Kubernetes::Pod::SUCCEEDED } + before do expect(service).to receive(:pod_phase).once.and_return(phase) end @@ -137,6 +138,7 @@ describe Clusters::Applications::CheckInstallationProgressService, '#execute' do context 'when installation POD succeeded' do let(:phase) { Gitlab::Kubernetes::Pod::SUCCEEDED } + before do expect(service).to receive(:pod_phase).once.and_return(phase) end 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 68ad0208226..a70b94a6fd6 100644 --- a/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb +++ b/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb @@ -46,6 +46,7 @@ describe Clusters::Applications::CheckUninstallProgressService do context 'when installation POD succeeded' do let(:phase) { Gitlab::Kubernetes::Pod::SUCCEEDED } + before do expect_any_instance_of(Gitlab::Kubernetes::Helm::Api) .to receive(:delete_pod!) diff --git a/spec/services/clusters/applications/patch_service_spec.rb b/spec/services/clusters/applications/patch_service_spec.rb index 3ebe0540837..c6d0fee43c4 100644 --- a/spec/services/clusters/applications/patch_service_spec.rb +++ b/spec/services/clusters/applications/patch_service_spec.rb @@ -51,7 +51,7 @@ describe Clusters::Applications::PatchService do service.execute expect(application).to be_update_errored - expect(application.status_reason).to match('Kubernetes error: 500') + expect(application.status_reason).to eq(_('Kubernetes error: %{error_code}') % { error_code: 500 }) end end @@ -73,7 +73,7 @@ describe Clusters::Applications::PatchService do service.execute expect(application).to be_update_errored - expect(application.status_reason).to eq('Failed to update.') + expect(application.status_reason).to eq(_('Failed to update.')) end end end diff --git a/spec/services/clusters/applications/upgrade_service_spec.rb b/spec/services/clusters/applications/upgrade_service_spec.rb index a80b1d9127c..48fa79eeb97 100644 --- a/spec/services/clusters/applications/upgrade_service_spec.rb +++ b/spec/services/clusters/applications/upgrade_service_spec.rb @@ -51,7 +51,7 @@ describe Clusters::Applications::UpgradeService do service.execute expect(application).to be_update_errored - expect(application.status_reason).to match('Kubernetes error: 500') + expect(application.status_reason).to eq(_('Kubernetes error: %{error_code}') % { error_code: 500 }) end end @@ -73,7 +73,7 @@ describe Clusters::Applications::UpgradeService do service.execute expect(application).to be_update_errored - expect(application.status_reason).to eq('Failed to upgrade.') + expect(application.status_reason).to eq(_('Failed to upgrade.')) end end end |