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-02-09 15:08:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-09 15:08:54 +0300
commit1804227b4fb012858930b66419b026a5bf8b8f7d (patch)
tree60df6784d16c2a05d5c3110d8651cfed86a96034 /spec/lib/gitlab/kubernetes
parent204311cdb5049d193070ce04bcc0d4f8bcc0b6f8 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/kubernetes')
-rw-r--r--spec/lib/gitlab/kubernetes/kube_client_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/kubernetes/kube_client_spec.rb b/spec/lib/gitlab/kubernetes/kube_client_spec.rb
index 729c2b04930..1959fbca33b 100644
--- a/spec/lib/gitlab/kubernetes/kube_client_spec.rb
+++ b/spec/lib/gitlab/kubernetes/kube_client_spec.rb
@@ -92,6 +92,16 @@ describe Gitlab::Kubernetes::KubeClient do
it_behaves_like 'local address'
end
+
+ it 'falls back to default options, but allows overriding' do
+ client = Gitlab::Kubernetes::KubeClient.new(api_url, {})
+ defaults = Gitlab::Kubernetes::KubeClient::DEFAULT_KUBECLIENT_OPTIONS
+ expect(client.kubeclient_options[:timeouts]).to eq(defaults[:timeouts])
+
+ client = Gitlab::Kubernetes::KubeClient.new(api_url, timeouts: { read: 7 })
+ expect(client.kubeclient_options[:timeouts][:read]).to eq(7)
+ expect(client.kubeclient_options[:timeouts][:open]).to eq(defaults[:timeouts][:open])
+ end
end
describe '#core_client' do