summaryrefslogtreecommitdiff
path: root/spec/services/clusters/applications
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-12 12:07:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-12 12:07:33 +0000
commit784fae4b9d7e92350075df2a43d06893080ed1e6 (patch)
treec7a6fd444acd6897622b233b250a34fd176f01da /spec/services/clusters/applications
parentfc53ce8e6ca67bf217470179a1ea6cf139bcffad (diff)
downloadgitlab-ce-784fae4b9d7e92350075df2a43d06893080ed1e6.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/clusters/applications')
-rw-r--r--spec/services/clusters/applications/check_installation_progress_service_spec.rb2
-rw-r--r--spec/services/clusters/applications/check_uninstall_progress_service_spec.rb1
-rw-r--r--spec/services/clusters/applications/patch_service_spec.rb4
-rw-r--r--spec/services/clusters/applications/upgrade_service_spec.rb4
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