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/wait_for_cluster_creation_worker_spec.rb | |
parent | 8078bd185fd9fce86cb5a8d9a6b6209e0c23ae44 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/wait_for_cluster_creation_worker_spec.rb')
-rw-r--r-- | spec/workers/wait_for_cluster_creation_worker_spec.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/spec/workers/wait_for_cluster_creation_worker_spec.rb b/spec/workers/wait_for_cluster_creation_worker_spec.rb index 850eba263a7..b21a9b612af 100644 --- a/spec/workers/wait_for_cluster_creation_worker_spec.rb +++ b/spec/workers/wait_for_cluster_creation_worker_spec.rb @@ -8,8 +8,19 @@ describe WaitForClusterCreationWorker do let(:cluster) { create(:cluster, provider_type: :gcp, provider_gcp: provider) } let(:provider) { create(:cluster_provider_gcp, :creating) } - it 'provision a cluster' do - expect_any_instance_of(Clusters::Gcp::VerifyProvisionStatusService).to receive(:execute) + it 'provisions a cluster' do + expect_any_instance_of(Clusters::Gcp::VerifyProvisionStatusService).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, :creating) } + + it 'provisions a cluster' do + expect_any_instance_of(Clusters::Aws::VerifyProvisionStatusService).to receive(:execute).with(provider) described_class.new.perform(cluster.id) end |