debian-mirror-gitlab/scripts/gitaly-test-spawn

27 lines
791 B
Plaintext
Raw Normal View History

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