summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/gitlab.yml.example1
-rw-r--r--lib/tasks/gitlab/gitaly.rake5
-rw-r--r--spec/tasks/gitlab/gitaly_rake_spec.rb1
3 files changed, 5 insertions, 2 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 82dd53013f9..43a8c0078ca 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -599,6 +599,7 @@ test:
gitaly_address: unix:tmp/tests/gitaly/gitaly.socket
gitaly:
enabled: true
+ token: secret
backup:
path: tmp/tests/backups
gitlab_shell:
diff --git a/lib/tasks/gitlab/gitaly.rake b/lib/tasks/gitlab/gitaly.rake
index e88111c3725..a8db5701d0b 100644
--- a/lib/tasks/gitlab/gitaly.rake
+++ b/lib/tasks/gitlab/gitaly.rake
@@ -58,8 +58,9 @@ namespace :gitlab do
storages << { name: key, path: val['path'] }
end
-
- TOML.dump(socket_path: address.sub(%r{\Aunix:}, ''), storage: storages)
+ config = { socket_path: address.sub(%r{\Aunix:}, ''), storage: storages }
+ config[:auth] = { token: 'secret' } if Rails.env.test?
+ TOML.dump(config)
end
def create_gitaly_configuration
diff --git a/spec/tasks/gitlab/gitaly_rake_spec.rb b/spec/tasks/gitlab/gitaly_rake_spec.rb
index cfa6c9ca8ce..c9a0f1cb144 100644
--- a/spec/tasks/gitlab/gitaly_rake_spec.rb
+++ b/spec/tasks/gitlab/gitaly_rake_spec.rb
@@ -89,6 +89,7 @@ describe 'gitlab:gitaly namespace rake task' do
}
}
allow(Gitlab.config.repositories).to receive(:storages).and_return(config)
+ allow(Rails.env).to receive(:test?).and_return(false)
expected_output = ''
Timecop.freeze do