diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2018-01-04 16:49:20 +0100 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2018-01-04 16:49:20 +0100 |
commit | 82992ac6d850fa1532bef5d829e309a81748d8f8 (patch) | |
tree | 842186142224fa5d92242a591d413829f8475865 | |
parent | 00e84cac824c9695f40f558f2d04eaa95a1110df (diff) | |
download | gitlab-ce-test-with-local-gitaly.tar.gz |
Fix broken method calltest-with-local-gitaly
-rw-r--r-- | lib/gitlab/setup_helper.rb | 6 | ||||
-rw-r--r-- | lib/tasks/gitlab/gitaly.rake | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/setup_helper.rb b/lib/gitlab/setup_helper.rb index 12d0bf9626d..d01213bb6e0 100644 --- a/lib/gitlab/setup_helper.rb +++ b/lib/gitlab/setup_helper.rb @@ -9,7 +9,7 @@ module Gitlab # because it uses a Unix socket. # For development and testing purposes, an extra storage is added to gitaly, # which is not known to Rails, but must be explicitly stubbed. - def gitaly_configuration_toml(dir, gitaly_ruby: true) + def gitaly_configuration_toml(gitaly_dir, gitaly_ruby: true) storages = [] address = nil @@ -33,14 +33,13 @@ module Gitlab config = { socket_path: address.sub(%r{\Aunix:}, ''), storage: storages } config[:auth] = { token: 'secret' } if Rails.env.test? - config[:'gitaly-ruby'] = { dir: File.join(dir, 'ruby') } if gitaly_ruby + config[:'gitaly-ruby'] = { dir: File.join(gitaly_dir, 'ruby') } if gitaly_ruby config[:'gitlab-shell'] = { dir: Gitlab.config.gitlab_shell.path } config[:bin_dir] = Gitlab.config.gitaly.client_path TOML.dump(config) end - # The Rails/Output cop complains about 'puts' but that's what we want here. # rubocop:disable Rails/Output def create_gitaly_configuration(dir, force: false) config_path = File.join(dir, 'config.toml') @@ -56,6 +55,7 @@ module Gitlab puts "Skipping config.toml generation:" puts e.message end + # rubocop:enable Rails/Output end end end diff --git a/lib/tasks/gitlab/gitaly.rake b/lib/tasks/gitlab/gitaly.rake index 7a1d2f5fc47..4507b841964 100644 --- a/lib/tasks/gitlab/gitaly.rake +++ b/lib/tasks/gitlab/gitaly.rake @@ -39,7 +39,7 @@ namespace :gitlab do # Exclude gitaly-ruby configuration because that depends on the gitaly # installation directory. - Gitlab::SetupHelper.gitaly_configuration_toml(gitaly_ruby: false) + puts Gitlab::SetupHelper.gitaly_configuration_toml('', gitaly_ruby: false) end end end |