diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-11-02 18:46:15 +0300 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-11-02 18:46:15 +0300 |
commit | 5ede567d718bcf69a204dee83155399a401cb465 (patch) | |
tree | 932ca30df7e32ab92a664ebfd2b9284641061e73 /spec/workers/cluster_provision_worker_spec.rb | |
parent | 2a89f065a478839e330d1f0c5f314ddf8489d77b (diff) |
Incorporates Kubernetes Namespace into Cluster's flow
Diffstat (limited to 'spec/workers/cluster_provision_worker_spec.rb')
-rw-r--r-- | spec/workers/cluster_provision_worker_spec.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/workers/cluster_provision_worker_spec.rb b/spec/workers/cluster_provision_worker_spec.rb index 8054ec11a48..0a2dfef36a4 100644 --- a/spec/workers/cluster_provision_worker_spec.rb +++ b/spec/workers/cluster_provision_worker_spec.rb @@ -14,18 +14,25 @@ describe ClusterProvisionWorker do end context 'when provider type is user' do - let(:cluster) { create(:cluster, provider_type: :user) } + let(:cluster) { create(:cluster, :provided_by_user) } it 'does not provision a cluster' do expect_any_instance_of(Clusters::Gcp::ProvisionService).not_to receive(:execute) described_class.new.perform(cluster.id) end + + it 'configures kubernetes platform' do + expect(ClusterPlatformConfigureWorker).to receive(:perform_async).with(cluster.id) + + described_class.new.perform(cluster.id) + end end context 'when cluster does not exist' do it 'does not provision a cluster' do expect_any_instance_of(Clusters::Gcp::ProvisionService).not_to receive(:execute) + expect(ClusterPlatformConfigureWorker).not_to receive(:perform_async) described_class.new.perform(123) end |