Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
26aa8011
Commit
26aa8011
authored
Nov 06, 2019
by
Jacob Vosmaer
Committed by
Imre Farkas
Nov 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add rspec gitaly troubleshooting hint
parent
2a150e3e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
spec/support/helpers/test_env.rb
spec/support/helpers/test_env.rb
+20
-5
No files found.
spec/support/helpers/test_env.rb
View file @
26aa8011
...
...
@@ -148,8 +148,6 @@ module TestEnv
end
def
setup_gitaly
socket_path
=
Gitlab
::
GitalyClient
.
address
(
'default'
).
sub
(
/\Aunix:/
,
''
)
gitaly_dir
=
File
.
dirname
(
socket_path
)
install_gitaly_args
=
[
gitaly_dir
,
repos_path
,
gitaly_url
].
compact
.
join
(
','
)
component_timed_setup
(
'Gitaly'
,
...
...
@@ -162,8 +160,16 @@ module TestEnv
end
end
def
gitaly_socket_path
Gitlab
::
GitalyClient
.
address
(
'default'
).
sub
(
/\Aunix:/
,
''
)
end
def
gitaly_dir
File
.
dirname
(
gitaly_socket_path
)
end
def
start_gitaly
(
gitaly_dir
)
if
ENV
[
'CI'
].
present
?
if
ci
?
# Gitaly has been spawned outside this process already
return
end
...
...
@@ -172,8 +178,13 @@ module TestEnv
spawn_script
=
Rails
.
root
.
join
(
'scripts/gitaly-test-spawn'
).
to_s
Bundler
.
with_original_env
do
raise
"gitaly spawn failed"
unless
system
(
spawn_script
)
unless
system
(
spawn_script
)
message
=
'gitaly spawn failed'
message
+=
" (try `rm -rf
#{
gitaly_dir
}
` ?)"
unless
ci?
raise
message
end
end
@gitaly_pid
=
Integer
(
File
.
read
(
'tmp/tests/gitaly.pid'
))
Kernel
.
at_exit
{
stop_gitaly
}
...
...
@@ -386,7 +397,7 @@ module TestEnv
ensure_component_dir_name_is_correct!
(
component
,
install_dir
)
# On CI, once installed, components never need update
return
if
File
.
exist?
(
install_dir
)
&&
ENV
[
'CI'
]
return
if
File
.
exist?
(
install_dir
)
&&
ci?
if
component_needs_update?
(
install_dir
,
version
)
# Cleanup the component entirely to ensure we start fresh
...
...
@@ -407,6 +418,10 @@ module TestEnv
puts
"
#{
component
}
set up in
#{
Time
.
now
-
start
}
seconds...
\n
"
end
def
ci?
ENV
[
'CI'
].
present?
end
def
ensure_component_dir_name_is_correct!
(
component
,
path
)
actual_component_dir_name
=
File
.
basename
(
path
)
expected_component_dir_name
=
component
.
parameterize
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment