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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-08 09:08:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-08 09:08:13 +0300
commitf6e985dba4d0f5b1ede95e9174d30dd6a8bedf0d (patch)
treec1fed91ae38ad6150ba323a2fc9a68f50f648bb4 /spec/lib/gitlab/ci
parent30010b161d42bdac3ab5cd16e63cc61c2f4939f3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/ci')
-rw-r--r--spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb58
1 files changed, 4 insertions, 54 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 2493855f851..66240380edd 100644
--- a/spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb
+++ b/spec/lib/gitlab/ci/build/prerequisite/kubernetes_namespace_spec.rb
@@ -38,44 +38,12 @@ describe Gitlab::Ci::Build::Prerequisite::KubernetesNamespace do
.and_return(double(execute: kubernetes_namespace))
end
- context 'and the knative-serving namespace is missing' do
- before do
- allow(Clusters::KnativeServingNamespaceFinder).to receive(:new)
- .and_return(double(execute: false))
- end
-
- it { is_expected.to be_truthy }
- end
-
- context 'and the knative-serving namespace exists' do
- before do
- allow(Clusters::KnativeServingNamespaceFinder).to receive(:new)
- .and_return(double(execute: true))
- end
-
- context 'and the knative version role binding is missing' do
- before do
- allow(Clusters::KnativeVersionRoleBindingFinder).to receive(:new)
- .and_return(double(execute: nil))
- end
-
- it { is_expected.to be_truthy }
- end
-
- context 'and the knative version role binding already exists' do
- before do
- allow(Clusters::KnativeVersionRoleBindingFinder).to receive(:new)
- .and_return(double(execute: true))
- end
-
- it { is_expected.to be_falsey }
+ it { is_expected.to be_falsey }
- context 'and the service_account_token is blank' do
- let(:kubernetes_namespace) { instance_double(Clusters::KubernetesNamespace, service_account_token: nil) }
+ context 'and the service_account_token is blank' do
+ let(:kubernetes_namespace) { instance_double(Clusters::KubernetesNamespace, service_account_token: nil) }
- it { is_expected.to be_truthy }
- end
- end
+ it { is_expected.to be_truthy }
end
end
end
@@ -188,24 +156,6 @@ describe Gitlab::Ci::Build::Prerequisite::KubernetesNamespace do
subject
end
end
-
- context 'knative version role binding is missing' do
- before do
- allow(Clusters::KubernetesNamespaceFinder).to receive(:new)
- .and_return(double(execute: kubernetes_namespace))
- allow(Clusters::KnativeVersionRoleBindingFinder).to receive(:new)
- .and_return(double(execute: nil))
- end
-
- it 'creates the knative version role binding' do
- expect(Clusters::Kubernetes::CreateOrUpdateNamespaceService)
- .to receive(:new)
- .with(cluster: cluster, kubernetes_namespace: kubernetes_namespace)
- .and_return(service)
-
- subject
- end
- end
end
context 'completion is not required' do