Skip to content
代码片段 群组 项目
未验证 提交 bc77c387 编辑于 作者: Rémy Coutable's avatar Rémy Coutable
浏览文件

Rename GitalyTest to GitalySetup and move it to the 'spec' folder


This makes sure unit and integration tests run when this file is
touched.

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
上级 1fd9a02c
No related branches found
No related tags found
无相关合并请求
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
require 'fileutils' require 'fileutils'
require_relative 'gitaly_test' require_relative '../spec/support/helpers/gitaly_setup'
# This script assumes tmp/tests/gitaly already contains the correct # This script assumes tmp/tests/gitaly already contains the correct
# Gitaly version. We just have to compile it and run its 'bundle # Gitaly version. We just have to compile it and run its 'bundle
# install'. We have this separate script for that to avoid bundle # install'. We have this separate script for that to avoid bundle
# poisoning in CI. This script should only be run in CI. # poisoning in CI. This script should only be run in CI.
class GitalyTestBuild class GitalyTestBuild
include GitalyTest include GitalySetup
def run def run
set_bundler_config set_bundler_config
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
# This script is used both in CI and in local development 'rspec' runs. # This script is used both in CI and in local development 'rspec' runs.
require_relative 'gitaly_test' require_relative '../spec/support/helpers/gitaly_setup'
class GitalyTestSpawn class GitalyTestSpawn
include GitalyTest include GitalySetup
def run def run
set_bundler_config set_bundler_config
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
require 'socket' require 'socket'
require 'logger' require 'logger'
module GitalyTest module GitalySetup
LOGGER = begin LOGGER = begin
default_name = ENV['CI'] ? 'DEBUG' : 'WARN' default_name = ENV['CI'] ? 'DEBUG' : 'WARN'
level_name = ENV['GITLAB_TESTING_LOG_LEVEL']&.upcase level_name = ENV['GITLAB_TESTING_LOG_LEVEL']&.upcase
...@@ -19,15 +19,15 @@ module GitalyTest ...@@ -19,15 +19,15 @@ module GitalyTest
end end
def tmp_tests_gitaly_dir def tmp_tests_gitaly_dir
File.expand_path('../tmp/tests/gitaly', __dir__) File.expand_path('../../../tmp/tests/gitaly', __dir__)
end end
def tmp_tests_gitlab_shell_dir def tmp_tests_gitlab_shell_dir
File.expand_path('../tmp/tests/gitlab-shell', __dir__) File.expand_path('../../../tmp/tests/gitlab-shell', __dir__)
end end
def rails_gitlab_shell_secret def rails_gitlab_shell_secret
File.expand_path('../.gitlab_shell_secret', __dir__) File.expand_path('../../../.gitlab_shell_secret', __dir__)
end end
def gemfile def gemfile
...@@ -62,7 +62,7 @@ def set_bundler_config ...@@ -62,7 +62,7 @@ def set_bundler_config
system('bundle config set --local retry 3', chdir: gemfile_dir) system('bundle config set --local retry 3', chdir: gemfile_dir)
if ENV['CI'] if ENV['CI']
bundle_path = File.expand_path('../vendor/gitaly-ruby', __dir__) bundle_path = File.expand_path('../../../vendor/gitaly-ruby', __dir__)
system('bundle', 'config', 'set', '--local', 'path', bundle_path, chdir: gemfile_dir) system('bundle', 'config', 'set', '--local', 'path', bundle_path, chdir: gemfile_dir)
end end
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册