diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2018-01-05 11:31:12 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-01-05 11:31:12 +0000 |
commit | c5e2c0665fe7e4937689cfedaa064aa64f538c8b (patch) | |
tree | 0b758368b0191fdd4e6f95d862b2265b8e0bdd7c /spec | |
parent | e4b8e913245cad07504a1de658301d90b1e0506f (diff) | |
download | gitlab-ce-c5e2c0665fe7e4937689cfedaa064aa64f538c8b.tar.gz |
Allow local tests to use a modified Gitaly
Diffstat (limited to 'spec')
-rw-r--r-- | spec/support/test_env.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index 1d99746b09f..664698fcbaf 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -1,4 +1,5 @@ require 'rspec/mocks' +require 'toml' module TestEnv extend self @@ -147,6 +148,9 @@ module TestEnv version: Gitlab::GitalyClient.expected_server_version, task: "gitlab:gitaly:install[#{gitaly_dir}]") do + # Always re-create config, in case it's outdated. This is fast anyway. + Gitlab::SetupHelper.create_gitaly_configuration(gitaly_dir, force: true) + start_gitaly(gitaly_dir) end end @@ -347,6 +351,9 @@ module TestEnv end def component_needs_update?(component_folder, expected_version) + # Allow local overrides of the component for tests during development + return false if Rails.env.test? && File.symlink?(component_folder) + version = File.read(File.join(component_folder, 'VERSION')).strip # Notice that this will always yield true when using branch versions |