2017-07-31 09:17:14 -04:00
|
|
|
#!/usr/bin/env ruby
|
2021-02-12 07:09:02 -05:00
|
|
|
# frozen_string_literal: true
|
2017-07-31 09:17:14 -04:00
|
|
|
|
2018-05-14 04:10:29 -04:00
|
|
|
# This script is used both in CI and in local development 'rspec' runs.
|
2017-07-31 09:17:14 -04:00
|
|
|
|
2021-04-21 05:09:15 -04:00
|
|
|
require_relative '../spec/support/helpers/gitaly_setup'
|
2018-05-14 04:10:29 -04:00
|
|
|
|
|
|
|
class GitalyTestSpawn
|
2021-04-21 05:09:15 -04:00
|
|
|
include GitalySetup
|
2018-05-14 04:10:29 -04:00
|
|
|
|
|
|
|
def run
|
2021-04-01 08:08:56 -04:00
|
|
|
set_bundler_config
|
2021-01-06 07:10:58 -05:00
|
|
|
install_gitaly_gems if ENV['CI']
|
2018-05-14 04:10:29 -04: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 14:08:10 -04:00
|
|
|
IO.write(File.expand_path('../tmp/tests/gitaly.pid', __dir__), start_gitaly)
|
2020-12-16 22:10:36 -05:00
|
|
|
IO.write(File.expand_path('../tmp/tests/gitaly2.pid', __dir__), start_gitaly2)
|
2020-03-25 14:08:10 -04:00
|
|
|
IO.write(File.expand_path('../tmp/tests/praefect.pid', __dir__), start_praefect)
|
2018-05-14 04:10:29 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
GitalyTestSpawn.new.run
|