diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-01 06:06:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-01 06:06:26 +0300 |
commit | 56d96ad7fab4d4b95f5529d8080b3cc2873794a0 (patch) | |
tree | 7fe93fc8ff4d82d815000781ffb9c98d7259211a /spec/workers/cluster_provision_worker_spec.rb | |
parent | 8078bd185fd9fce86cb5a8d9a6b6209e0c23ae44 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/cluster_provision_worker_spec.rb')
-rw-r--r-- | spec/workers/cluster_provision_worker_spec.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/workers/cluster_provision_worker_spec.rb b/spec/workers/cluster_provision_worker_spec.rb index 3f69962f25d..608639331fd 100644 --- a/spec/workers/cluster_provision_worker_spec.rb +++ b/spec/workers/cluster_provision_worker_spec.rb @@ -9,7 +9,18 @@ describe ClusterProvisionWorker do let(:provider) { create(:cluster_provider_gcp, :scheduled) } it 'provision a cluster' do - expect_any_instance_of(Clusters::Gcp::ProvisionService).to receive(:execute) + expect_any_instance_of(Clusters::Gcp::ProvisionService).to receive(:execute).with(provider) + + described_class.new.perform(cluster.id) + end + end + + context 'when provider type is aws' do + let(:cluster) { create(:cluster, provider_type: :aws, provider_aws: provider) } + let(:provider) { create(:cluster_provider_aws, :scheduled) } + + it 'provision a cluster' do + expect_any_instance_of(Clusters::Aws::ProvisionService).to receive(:execute).with(provider) described_class.new.perform(cluster.id) end |