summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2019-06-14 15:57:48 +1000
committerDylan Griffith <dyl.griffith@gmail.com>2019-06-14 16:00:54 +1000
commitee28255b21b712bf3d92db548915fee43658a430 (patch)
tree8a9245f37926c8e8e578c0f75ac9b7d5df93ea67 /spec/lib
parentf35d3a241caab4c4b926d1ad6fee64ad1bdf8625 (diff)
downloadgitlab-ce-ee28255b21b712bf3d92db548915fee43658a430.tar.gz
Refresh service_account_token for kubernetes_namespaces55362-refresh-blank-service-account-token
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')
-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