diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-11-15 05:28:29 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-12-05 00:16:44 +0300 |
commit | 546aa0cae4999176bf914a00893f25e177886c53 (patch) | |
tree | b403eb7a96fb5294c13fb2a693e46f56fbed6987 /spec | |
parent | 0e3f6251f56563bfafaee2680d6ea07f863df725 (diff) |
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')
-rw-r--r-- | spec/services/clusters/gcp/finalize_creation_service_spec.rb | 6 |
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 |