Commit 218da88e authored by Jacob Vosmaer's avatar Jacob Vosmaer

Enable gitaly token auth when testing

parent 4f8af50b
...@@ -599,6 +599,7 @@ test: ...@@ -599,6 +599,7 @@ test:
gitaly_address: unix:tmp/tests/gitaly/gitaly.socket gitaly_address: unix:tmp/tests/gitaly/gitaly.socket
gitaly: gitaly:
enabled: true enabled: true
token: secret
backup: backup:
path: tmp/tests/backups path: tmp/tests/backups
gitlab_shell: gitlab_shell:
......
...@@ -58,8 +58,9 @@ namespace :gitlab do ...@@ -58,8 +58,9 @@ namespace :gitlab do
storages << { name: key, path: val['path'] } storages << { name: key, path: val['path'] }
end end
config = { socket_path: address.sub(%r{\Aunix:}, ''), storage: storages }
TOML.dump(socket_path: address.sub(%r{\Aunix:}, ''), storage: storages) config[:auth] = { token: 'secret' } if Rails.env.test?
TOML.dump(config)
end end
def create_gitaly_configuration def create_gitaly_configuration
......
...@@ -89,6 +89,7 @@ describe 'gitlab:gitaly namespace rake task' do ...@@ -89,6 +89,7 @@ describe 'gitlab:gitaly namespace rake task' do
} }
} }
allow(Gitlab.config.repositories).to receive(:storages).and_return(config) allow(Gitlab.config.repositories).to receive(:storages).and_return(config)
allow(Rails.env).to receive(:test?).and_return(false)
expected_output = '' expected_output = ''
Timecop.freeze do Timecop.freeze do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment