Commit 6bf05c3a authored by Jan Provaznik's avatar Jan Provaznik

Merge branch...

Merge branch '327608-consider-running-all-tests-when-scripts-gitaly_test-rb-is-changed' into 'master'

Ensure unit and integration tests run for any change to our central Gitaly test setup file [RUN ALL RSPEC]

See merge request gitlab-org/gitlab!59288
parents 61e691e4 bc77c387
......@@ -3,14 +3,14 @@
require 'fileutils'
require_relative 'gitaly_test'
require_relative '../spec/support/helpers/gitaly_setup'
# This script assumes tmp/tests/gitaly already contains the correct
# Gitaly version. We just have to compile it and run its 'bundle
# install'. We have this separate script for that to avoid bundle
# poisoning in CI. This script should only be run in CI.
class GitalyTestBuild
include GitalyTest
include GitalySetup
def run
set_bundler_config
......
......@@ -3,10 +3,10 @@
# 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
include GitalyTest
include GitalySetup
def run
set_bundler_config
......
......@@ -10,7 +10,7 @@ require 'securerandom'
require 'socket'
require 'logger'
module GitalyTest
module GitalySetup
LOGGER = begin
default_name = ENV['CI'] ? 'DEBUG' : 'WARN'
level_name = ENV['GITLAB_TESTING_LOG_LEVEL']&.upcase
......@@ -19,15 +19,15 @@ module GitalyTest
end
def tmp_tests_gitaly_dir
File.expand_path('../tmp/tests/gitaly', __dir__)
File.expand_path('../../../tmp/tests/gitaly', __dir__)
end
def tmp_tests_gitlab_shell_dir
File.expand_path('../tmp/tests/gitlab-shell', __dir__)
File.expand_path('../../../tmp/tests/gitlab-shell', __dir__)
end
def rails_gitlab_shell_secret
File.expand_path('../.gitlab_shell_secret', __dir__)
File.expand_path('../../../.gitlab_shell_secret', __dir__)
end
def gemfile
......@@ -62,7 +62,7 @@ module GitalyTest
system('bundle config set --local retry 3', chdir: gemfile_dir)
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)
end
end
......
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