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/lib/gitlab/ci/build | |
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/lib/gitlab/ci/build')
-rw-r--r-- | spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb b/spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb index e8332b14627..5387863bd07 100644 --- a/spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb +++ b/spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb @@ -28,6 +28,12 @@ describe Gitlab::Ci::Build::Prerequisite::KubernetesNamespace do it { is_expected.to be_truthy } + context 'and the cluster is not managed' do + let(:cluster) { create(:cluster, :not_managed, projects: [build.project]) } + + it { is_expected.to be_falsey } + end + context 'and a namespace is already created for this project' do let!(:kubernetes_namespace) { create(:cluster_kubernetes_namespace, cluster: cluster, project: build.project) } |