BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c2afd107
Commit
c2afd107
authored
Jan 15, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'stop-gitaly-atexit' into 'master'
Use an at_exit hook to stop test gitaly Closes #41991 See merge request gitlab-org/gitlab-ce!16433
parents
6b36fff5
4aaf3dae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
spec_helper.rb
spec/spec_helper.rb
+0
-4
test_env.rb
spec/support/test_env.rb
+3
-5
No files found.
spec/spec_helper.rb
View file @
c2afd107
...
...
@@ -97,10 +97,6 @@ RSpec.configure do |config|
TestEnv
.
init
end
config
.
after
(
:suite
)
do
TestEnv
.
cleanup
end
config
.
before
(
:example
)
do
# Skip pre-receive hook check so we can use the web editor and merge.
allow_any_instance_of
(
Gitlab
::
Git
::
Hook
).
to
receive
(
:trigger
).
and_return
([
true
,
nil
])
...
...
spec/support/test_env.rb
View file @
c2afd107
...
...
@@ -90,10 +90,6 @@ module TestEnv
setup_forked_repo
end
def
cleanup
stop_gitaly
end
def
disable_mailer
allow_any_instance_of
(
NotificationService
).
to
receive
(
:mailer
)
.
and_return
(
double
.
as_null_object
)
...
...
@@ -163,6 +159,8 @@ module TestEnv
spawn_script
=
Rails
.
root
.
join
(
'scripts/gitaly-test-spawn'
).
to_s
@gitaly_pid
=
Bundler
.
with_original_env
{
IO
.
popen
([
spawn_script
],
&
:read
).
to_i
}
Kernel
.
at_exit
{
stop_gitaly
}
wait_gitaly
end
...
...
@@ -309,7 +307,7 @@ module TestEnv
# Before we used Git clone's --mirror option, bare repos could end up
# with missing refs, clearing them and retrying should fix the issue.
clean
up
&&
clean
_gitlab_test_path
&&
init
unless
reset
.
call
clean_gitlab_test_path
&&
init
unless
reset
.
call
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