summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-11-15 15:28:29 +1300
committerThong Kuah <tkuah@gitlab.com>2018-12-04 15:46:11 +1300
commit28b0b9c144a0869e218728d1d056607d1a7a7a8a (patch)
tree70d5159903e2dfd84c12ede44fa41baff38a5914 /spec/services
parent76d4e6d6d87f3e59f1864fa15da701bb789e301e (diff)
downloadgitlab-ce-28b0b9c144a0869e218728d1d056607d1a7a7a8a.tar.gz
Call ClusterPlatformConfigureWorker to re-use code
We remove configure_project_service_account and replace ClusterPlatformConfigureWorker as they perform exactly the same piece of work. This also makes GKE cluster creation to be the same as Adding existing cluster - they both now use another worker to execute CreateOrUpdateNamespaceService.
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/clusters/gcp/finalize_creation_service_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/services/clusters/gcp/finalize_creation_service_spec.rb b/spec/services/clusters/gcp/finalize_creation_service_spec.rb
index efee158739d..cb8f4bd32c8 100644
--- a/spec/services/clusters/gcp/finalize_creation_service_spec.rb
+++ b/spec/services/clusters/gcp/finalize_creation_service_spec.rb
@@ -48,6 +48,12 @@ describe Clusters::Gcp::FinalizeCreationService, '#execute' do
expect(kubernetes_namespace.service_account_name).to eq("#{namespace}-service-account")
expect(kubernetes_namespace.service_account_token).to be_present
end
+
+ it 'calls ClusterPlatformConfigureWorker in a ascync fashion' do
+ expect(ClusterPlatformConfigureWorker).to receive(:perform_async).with(cluster.id)
+
+ subject
+ end
end
shared_examples 'error' do