diff options
| author | Thong Kuah <tkuah@gitlab.com> | 2019-06-17 22:28:36 +0000 |
|---|---|---|
| committer | Thong Kuah <tkuah@gitlab.com> | 2019-06-17 22:28:36 +0000 |
| commit | 12d262c23f5a783106c08cd385ecb86ccb4b899c (patch) | |
| tree | 5c454f40babbd137d16119bd914ac7052451e2c1 /spec/lib | |
| parent | 2dea03bf103a05d98366d6a8e9e906e890147bdc (diff) | |
| parent | ee28255b21b712bf3d92db548915fee43658a430 (diff) | |
| download | gitlab-ce-12d262c23f5a783106c08cd385ecb86ccb4b899c.tar.gz | |
Merge branch '55362-refresh-blank-service-account-token' into 'master'
Refresh service_account_token for kubernetes_namespaces
See merge request gitlab-org/gitlab-ce!29657
Diffstat (limited to 'spec/lib')
| -rw-r--r-- | spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb | 8 |
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 |
