Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2019-06-14 08:57:48 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2019-06-14 09:00:54 +0300
commitee28255b21b712bf3d92db548915fee43658a430 (patch)
tree8a9245f37926c8e8e578c0f75ac9b7d5df93ea67 /spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb
parentf35d3a241caab4c4b926d1ad6fee64ad1bdf8625 (diff)
Refresh service_account_token for kubernetes_namespaces
There seems to be several examples where service_account_token is blank even in GitLab.com newly created kubernetes_namespaces . We have not figured out why they are blank but this should hopefully fix some issues similar to https://gitlab.com/gitlab-org/gitlab-ce/issues/55362
Diffstat (limited to 'spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb8
1 files changed, 7 insertions, 1 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 5387863bd07..5ac5122e800 100644
--- a/spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb
+++ b/spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb
@@ -35,9 +35,15 @@ describe Gitlab::Ci::Build::Prerequisite::KubernetesNamespace do
end
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 }
+
+ 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
context 'and cluster is project type' do