gitaly-test-spawn 522 Bytes
Newer Older
Jacob Vosmaer's avatar
Jacob Vosmaer committed
1 2
#!/usr/bin/env ruby

3
# This script is used both in CI and in local development 'rspec' runs.
Jacob Vosmaer's avatar
Jacob Vosmaer committed
4

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
require_relative 'gitaly_test'

class GitalyTestSpawn
  include GitalyTest

  def run
    check_gitaly_config!

    # # Uncomment line below to see all gitaly logs merged into CI trace
    # spawn('sleep 1; tail -f log/gitaly-test.log')

    pid = start_gitaly

    # In local development this pid file is used by rspec.
    IO.write(File.expand_path('../tmp/tests/gitaly.pid', __dir__), pid)
  end
end

GitalyTestSpawn.new.run