diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-05-03 01:05:53 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-05-03 01:05:53 +0000 |
commit | 89132bbdd63bbd033c43422500a972af6d94a4d0 (patch) | |
tree | b410a357818fff737a7de2f44fb715c1fb8aeb6e /spec/workers | |
parent | 7be2796e24e86c421c8988f454c51755b7f3e153 (diff) | |
download | gitlab-ce-89132bbdd63bbd033c43422500a972af6d94a4d0.tar.gz |
Add gitlab-managed option to clusters form
When this option is enabled, GitLab will create namespaces and service
accounts as usual. When disabled, GitLab wont create any project
specific kubernetes resources
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56557
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/cluster_configure_worker_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/workers/cluster_configure_worker_spec.rb b/spec/workers/cluster_configure_worker_spec.rb index bdb8e0e9c84..daf014ac574 100644 --- a/spec/workers/cluster_configure_worker_spec.rb +++ b/spec/workers/cluster_configure_worker_spec.rb @@ -68,6 +68,16 @@ describe ClusterConfigureWorker, '#perform' do it_behaves_like 'configured cluster' end + context 'when cluster is not managed' do + let(:cluster) { create(:cluster, :not_managed) } + + it 'does not configure the cluster' do + expect(Clusters::RefreshService).not_to receive(:create_or_update_namespaces_for_cluster) + + 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::Kubernetes::CreateOrUpdateNamespaceService).not_to receive(:execute) |