File tree Expand file tree Collapse file tree 5 files changed +8
-6
lines changed
files/gitlab-cookbooks/gitlab
spec/chef/cookbooks/gitlab Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ def workhorse_params
70
70
password : redis_params . last ,
71
71
sentinels : redis_sentinel_urls ( 'redis_sentinels' ) ,
72
72
sentinelMaster : redis [ 'master_name' ] ,
73
- sentinelPassword : redis [ 'master_password ']
73
+ sentinelPassword : gitlab_rails [ 'redis_sentinels_password ']
74
74
}
75
75
end
76
76
end
Original file line number Diff line number Diff line change 108
108
password : redis_params [ :password ] ,
109
109
sentinels : redis_params [ :sentinels ] ,
110
110
sentinel_master : redis_params [ :sentinelMaster ] ,
111
- master_password : redis_params [ :sentinelPassword ] ,
111
+ sentinel_password : redis_params [ :sentinelPassword ] ,
112
112
shutdown_timeout : shutdown_timeout ,
113
113
image_scaler_max_procs : image_scaler_max_procs ,
114
114
image_scaler_max_filesize : image_scaler_max_filesize ,
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ trusted_cidrs_for_x_forwarded_for = <%= @trusted_cidrs_for_x_forwarded_for.to_js
13
13
14
14
<% if @workhorse_keywatcher %>
15
15
[redis]
16
+ Password = "<%= @password %> "
16
17
<% if @sentinels.empty? %>
17
18
URL = "<%= @redis_url %> "
18
- Password = "<%= @password %> "
19
19
<% else %>
20
20
Sentinel = <%= @sentinels.to_json %>
21
21
SentinelMaster = "<%= @sentinel_master %> "
22
- Password = "<%= @master_password %> "
22
+ SentinelPassword = "<%= @sentinel_password %> "
23
23
<% end %>
24
24
<% end %>
25
25
Original file line number Diff line number Diff line change 186
186
expect ( params [ :password ] ) . to eq ( 'password_from.redis.master_password' )
187
187
expect ( params [ :sentinels ] . map ( &:to_s ) ) . to eq ( %w[ redis://sentinel1.example.com:12345 redis://sentinel2.example.com:12345 ] )
188
188
expect ( params [ :sentinelMaster ] ) . to eq ( 'master_from.redis.master_name' )
189
- expect ( params [ :sentinelPassword ] ) . to eq ( 'password_from.redis.master_password' )
189
+ expect ( params [ :sentinelPassword ] ) . to be_nil
190
190
expect ( params [ :url ] . to_s ) . to eq ( "redis://:password_from.redis.master_password@master_from.redis.master_name/" )
191
191
end
192
192
end
Original file line number Diff line number Diff line change 610
610
it 'should generate config file with the specified values' do
611
611
content = 'Sentinel = ["redis://:[email protected] :26379","redis://:[email protected] :12345"]'
612
612
content_sentinel_master = 'SentinelMaster = "examplemaster"'
613
- content_sentinel_password = 'Password = "examplepassword"'
613
+ content_password = 'Password = "examplepassword"'
614
+ content_sentinel_password = 'SentinelPassword = "some pass"'
614
615
content_url = 'URL ='
615
616
expect ( chef_run ) . to render_file ( "/var/opt/gitlab/gitlab-workhorse/config.toml" ) . with_content ( content )
617
+ expect ( chef_run ) . to render_file ( "/var/opt/gitlab/gitlab-workhorse/config.toml" ) . with_content ( content_password )
616
618
expect ( chef_run ) . to render_file ( "/var/opt/gitlab/gitlab-workhorse/config.toml" ) . with_content ( content_sentinel_master )
617
619
expect ( chef_run ) . to render_file ( "/var/opt/gitlab/gitlab-workhorse/config.toml" ) . with_content ( content_sentinel_password )
618
620
expect ( chef_run ) . not_to render_file ( "/var/opt/gitlab/gitlab-workhorse/config.toml" ) . with_content ( content_url )
You can’t perform that action at this time.
0 commit comments