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>2019-12-24 03:07:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-24 03:07:31 +0300
commit3888bc4261500c275759683076e07baaf352e5ec (patch)
treeeb70e0415be41a1d713cc89f211a6045778cd6b8 /spec/lib/gitlab/kubernetes/kube_client_spec.rb
parent33e1622bfe5afb2eea08ff06e44de490383a93e3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/kubernetes/kube_client_spec.rb')
-rw-r--r--spec/lib/gitlab/kubernetes/kube_client_spec.rb37
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/lib/gitlab/kubernetes/kube_client_spec.rb b/spec/lib/gitlab/kubernetes/kube_client_spec.rb
index 59e81d89a50..e08981a3415 100644
--- a/spec/lib/gitlab/kubernetes/kube_client_spec.rb
+++ b/spec/lib/gitlab/kubernetes/kube_client_spec.rb
@@ -136,6 +136,20 @@ describe Gitlab::Kubernetes::KubeClient do
end
end
+ describe '#istio_client' do
+ subject { client.istio_client }
+
+ it_behaves_like 'a Kubeclient'
+
+ it 'has the Istio API group endpoint' do
+ expect(subject.api_endpoint.to_s).to match(%r{\/apis\/networking.istio.io\Z})
+ end
+
+ it 'has the api_version' do
+ expect(subject.instance_variable_get(:@api_version)).to eq('v1alpha3')
+ end
+ end
+
describe '#knative_client' do
subject { client.knative_client }
@@ -233,6 +247,29 @@ describe Gitlab::Kubernetes::KubeClient do
end
end
+ describe 'istio API group' do
+ let(:istio_client) { client.istio_client }
+
+ [
+ :create_gateway,
+ :get_gateway,
+ :update_gateway
+ ].each do |method|
+ describe "##{method}" do
+ include_examples 'redirection not allowed', method
+ include_examples 'dns rebinding not allowed', method
+
+ it 'delegates to the istio client' do
+ expect(client).to delegate_method(method).to(:istio_client)
+ end
+
+ it 'responds to the method' do
+ expect(client).to respond_to method
+ end
+ end
+ end
+ end
+
describe 'non-entity methods' do
it 'does not proxy for non-entity methods' do
expect(client).not_to respond_to :proxy_url