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
1f10a3c2
Commit
1f10a3c2
authored
May 22, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop skipping tests if local dependencies are not found
parent
6ced4d13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
9 deletions
+1
-9
spec/lib/gitlab/health_checks/fs_shards_check_spec.rb
spec/lib/gitlab/health_checks/fs_shards_check_spec.rb
+1
-5
spec/support/timeout_helper.rb
spec/support/timeout_helper.rb
+0
-4
No files found.
spec/lib/gitlab/health_checks/fs_shards_check_spec.rb
View file @
1f10a3c2
...
@@ -109,9 +109,7 @@ describe Gitlab::HealthChecks::FsShardsCheck do
...
@@ -109,9 +109,7 @@ describe Gitlab::HealthChecks::FsShardsCheck do
let
(
:timeout_seconds
)
{
1
.
to_s
}
let
(
:timeout_seconds
)
{
1
.
to_s
}
before
do
before
do
skip
'timeout or gtimeout not available'
unless
any_timeout_command_exists?
allow
(
described_class
).
to
receive
(
:with_timeout
)
{
[
timeout_command
,
timeout_seconds
,
'sleep'
,
2
]
}
allow
(
described_class
).
to
receive
(
:with_timeout
)
{
[
timeout_command
,
timeout_seconds
].
concat
(
%w{ sleep 2 }
)
}
FileUtils
.
chmod_R
(
0755
,
tmp_dir
)
FileUtils
.
chmod_R
(
0755
,
tmp_dir
)
end
end
...
@@ -137,8 +135,6 @@ describe Gitlab::HealthChecks::FsShardsCheck do
...
@@ -137,8 +135,6 @@ describe Gitlab::HealthChecks::FsShardsCheck do
context
'when popen always finds required binaries'
do
context
'when popen always finds required binaries'
do
let
(
:timeout_seconds
)
{
30
.
to_s
}
let
(
:timeout_seconds
)
{
30
.
to_s
}
before
do
before
do
skip
'timeout or gtimeout not available'
unless
any_timeout_command_exists?
allow
(
described_class
).
to
receive
(
:exec_with_timeout
).
and_wrap_original
do
|
method
,
*
args
,
&
block
|
allow
(
described_class
).
to
receive
(
:exec_with_timeout
).
and_wrap_original
do
|
method
,
*
args
,
&
block
|
begin
begin
method
.
call
(
*
args
,
&
block
)
method
.
call
(
*
args
,
&
block
)
...
...
spec/support/timeout_helper.rb
View file @
1f10a3c2
...
@@ -6,10 +6,6 @@ module TimeoutHelper
...
@@ -6,10 +6,6 @@ module TimeoutHelper
false
false
end
end
def
any_timeout_command_exists?
command_exists?
(
'timeout'
)
||
command_exists?
(
'gtimeout'
)
end
def
timeout_command
def
timeout_command
@timeout_command
||=
@timeout_command
||=
if
command_exists?
(
'timeout'
)
if
command_exists?
(
'timeout'
)
...
...
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