| ... | @@ -35,9 +35,15 @@ describe Gitlab::Ci::Build::Prerequisite::KubernetesNamespace do |
... | @@ -35,9 +35,15 @@ describe Gitlab::Ci::Build::Prerequisite::KubernetesNamespace do |
|
|
end
|
|
end
|
|
|
|
|
|
|
|
context 'and a namespace is already created for this project' do
|
|
context 'and a namespace is already created for this project' do
|
|
|
let!(:kubernetes_namespace) { create(:cluster_kubernetes_namespace, cluster: cluster, project: build.project) }
|
|
let!(:kubernetes_namespace) { create(:cluster_kubernetes_namespace, :with_token, cluster: cluster, project: build.project) }
|
|
|
|
|
|
|
|
it { is_expected.to be_falsey }
|
|
it { is_expected.to be_falsey }
|
|
|
|
|
|
|
|
context 'and the service_account_token is blank' do
|
|
|
|
let!(:kubernetes_namespace) { create(:cluster_kubernetes_namespace, :without_token, cluster: cluster, project: build.project) }
|
|
|
|
|
|
|
|
it { is_expected.to be_truthy }
|
|
|
|
end
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
context 'and cluster is project type' do
|
|
context 'and cluster is project type' do
|
| ... | |
... | |
| ... | | ... | |