File tree Expand file tree Collapse file tree 4 files changed +38
-0
lines changed
spec/chef/cookbooks/gitlab/recipes/gitlab-rails/gitlab_yml Expand file tree Collapse file tree 4 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,11 @@ external_url 'GENERATED_EXTERNAL_URL'
192
192
###! request (default: 10)
193
193
# gitlab_rails['webhook_timeout'] = 10
194
194
195
+ ### HTTP client settings
196
+ ###! This is for setting up the mutual TLS client cert and password for the certificate file.
197
+ # gitlab_rails['http_client']['tls_client_cert_file'] = nil
198
+ # gitlab_rails['http_client']['tls_client_cert_password'] = nil
199
+
195
200
### GraphQL Settings
196
201
###! Tells the rails application how long it has to complete a GraphQL request.
197
202
###! We suggest this value to be higher than the database timeout value
Original file line number Diff line number Diff line change 615
615
616
616
default [ 'gitlab' ] [ 'gitlab_rails' ] [ 'webhook_timeout' ] = nil
617
617
618
+ default [ 'gitlab' ] [ 'gitlab_rails' ] [ 'http_client' ] = { }
619
+
618
620
default [ 'gitlab' ] [ 'gitlab_rails' ] [ 'graphql_timeout' ] = nil
619
621
620
622
default [ 'gitlab' ] [ 'gitlab_rails' ] [ 'initial_root_password' ] = nil
Original file line number Diff line number Diff line change @@ -110,6 +110,9 @@ production: &base
110
110
# Number of seconds to wait for HTTP response after sending webhook HTTP POST request (default: 10)
111
111
webhook_timeout: <%= @webhook_timeout %>
112
112
113
+ ## HTTP client settings
114
+ http_client: <%= @http_client.to_json %>
115
+
113
116
### GraphQL Settings
114
117
# Tells the rails application how long it has to complete a GraphQL request.
115
118
# We suggest this value to be higher than the database timeout value
Original file line number Diff line number Diff line change 84
84
end
85
85
end
86
86
87
+ describe 'HTTP client settings' do
88
+ context 'with default configuration' do
89
+ it 'renders gitlab.yml with empty HTTP client settings' do
90
+ expect ( gitlab_yml [ :production ] [ :gitlab ] [ :http_client ] ) . to eq ( { } )
91
+ end
92
+ end
93
+
94
+ context 'with mutual TLS settings configured' do
95
+ before do
96
+ stub_gitlab_rb (
97
+ gitlab_rails : {
98
+ http_client : {
99
+ tls_client_cert_file : '/path/to/tls_cert_file' ,
100
+ tls_client_cert_password : 'somepassword'
101
+ }
102
+ }
103
+ )
104
+ end
105
+
106
+ it 'renders gitlab.yml with HTTP client settings' do
107
+ expect ( gitlab_yml [ :production ] [ :gitlab ] [ :http_client ] ) . to eq (
108
+ tls_client_cert_file : '/path/to/tls_cert_file' ,
109
+ tls_client_cert_password : 'somepassword'
110
+ )
111
+ end
112
+ end
113
+ end
114
+
87
115
describe 'SMIME email settings' do
88
116
context 'with default configuration' do
89
117
it 'renders gitlab.yml with SMIME email settings disabled' do
You can’t perform that action at this time.
0 commit comments