Commit 4a89c574 authored by Albert Salim's avatar Albert Salim

Merge branch 'sh-use-absolute-paths-gitaly-tests-conditionally' into 'master'

Use absolute UNIX socket paths for test Gitaly processes in CI

See merge request gitlab-org/gitlab!55809
parents 02ec916a 632c5e7b
...@@ -192,7 +192,17 @@ module TestEnv ...@@ -192,7 +192,17 @@ module TestEnv
end end
def gitaly_dir def gitaly_dir
File.dirname(gitaly_socket_path) socket_path = gitaly_socket_path
socket_path = File.expand_path(gitaly_socket_path) if expand_path?
File.dirname(socket_path)
end
# Linux fails with "bind: invalid argument" if a UNIX socket path exceeds 108 characters:
# https://github.com/golang/go/issues/6895. We use absolute paths in CI to ensure
# that changes in the current working directory don't affect GRPC reconnections.
def expand_path?
!!ENV['CI']
end end
def start_gitaly(gitaly_dir) def start_gitaly(gitaly_dir)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment