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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
eef12afc
Commit
eef12afc
authored
May 23, 2017
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-download and recompile Gitaly in tests if the version changed
parent
52527be4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
spec/support/test_env.rb
spec/support/test_env.rb
+12
-1
No files found.
spec/support/test_env.rb
View file @
eef12afc
...
...
@@ -123,7 +123,7 @@ module TestEnv
socket_path
=
Gitlab
::
GitalyClient
.
address
(
'default'
).
sub
(
/\Aunix:/
,
''
)
gitaly_dir
=
File
.
dirname
(
socket_path
)
unless
File
.
directory
?
(
gitaly_dir
)
||
system
(
'rake'
,
"gitlab:gitaly:install[
#{
gitaly_dir
}
]"
)
unless
!
gitaly_needs_update
?
(
gitaly_dir
)
||
system
(
'rake'
,
"gitlab:gitaly:install[
#{
gitaly_dir
}
]"
)
raise
"Can't clone gitaly"
end
...
...
@@ -252,4 +252,15 @@ module TestEnv
cleanup
&&
init
unless
reset
.
call
end
end
def
gitaly_needs_update?
(
gitaly_dir
)
gitaly_version
=
File
.
read
(
File
.
join
(
gitaly_dir
,
'VERSION'
)).
strip
# Notice that this will always yield true when using branch versions
# (`=branch_name`), but that actually makes sure the server is always based
# on the latest branch revision.
gitaly_version
!=
Gitlab
::
GitalyClient
.
expected_server_version
rescue
Errno
::
ENOENT
true
end
end
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