gitlab-org--gitlab-foss/scripts/gitaly-test-spawn

27 lines
791 B
Text
Raw Normal View History

2017-07-31 09:17:14 -04:00
#!/usr/bin/env ruby
# 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
require_relative '../spec/support/helpers/gitaly_setup'
2018-05-14 04:10:29 -04:00
class GitalyTestSpawn
include GitalySetup
2018-05-14 04:10:29 -04:00
def run
set_bundler_config
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.
IO.write(File.expand_path('../tmp/tests/gitaly.pid', __dir__), start_gitaly)
IO.write(File.expand_path('../tmp/tests/gitaly2.pid', __dir__), start_gitaly2)
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