2017-07-31 13:17:14 +00:00
|
|
|
#!/usr/bin/env ruby
|
2021-02-12 12:09:02 +00:00
|
|
|
# frozen_string_literal: true
|
2017-07-31 13:17:14 +00:00
|
|
|
|
2018-05-14 08:10:29 +00:00
|
|
|
# This script is used both in CI and in local development 'rspec' runs.
|
2017-07-31 13:17:14 +00:00
|
|
|
|
2021-04-21 09:09:15 +00:00
|
|
|
require_relative '../spec/support/helpers/gitaly_setup'
|
2018-05-14 08:10:29 +00:00
|
|
|
|
|
|
|
class GitalyTestSpawn
|
2021-04-21 09:09:15 +00:00
|
|
|
include GitalySetup
|
2018-05-14 08:10:29 +00:00
|
|
|
|
|
|
|
def run
|
2021-04-01 12:08:56 +00:00
|
|
|
set_bundler_config
|
2021-01-06 12:10:58 +00:00
|
|
|
install_gitaly_gems if ENV['CI']
|
2018-05-14 08:10:29 +00:00
|
|
|
check_gitaly_config!
|
|
|
|
|
|
|
|
# # Uncomment line below to see all gitaly logs merged into CI trace
|
|
|
|
# spawn('sleep 1; tail -f log/gitaly-test.log')
|
|
|
|
|
|
|
|
# In local development this pid file is used by rspec.
|
2020-03-25 18:08:10 +00:00
|
|
|
IO.write(File.expand_path('../tmp/tests/gitaly.pid', __dir__), start_gitaly)
|
2020-12-17 03:10:36 +00:00
|
|
|
IO.write(File.expand_path('../tmp/tests/gitaly2.pid', __dir__), start_gitaly2)
|
2020-03-25 18:08:10 +00:00
|
|
|
IO.write(File.expand_path('../tmp/tests/praefect.pid', __dir__), start_praefect)
|
2018-05-14 08:10:29 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
GitalyTestSpawn.new.run
|