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
1c59ba67
Commit
1c59ba67
authored
Jun 07, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not cleanup temp directory as this apparently causes silent rspec failures on linux in CI
parent
4679107f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
15 deletions
+4
-15
metrics_controller_spec.rb
spec/controllers/metrics_controller_spec.rb
+2
-8
metrics_spec.rb
spec/lib/gitlab/metrics_spec.rb
+2
-7
No files found.
spec/controllers/metrics_controller_spec.rb
View file @
1c59ba67
...
...
@@ -5,17 +5,11 @@ describe MetricsController do
let
(
:token
)
{
current_application_settings
.
health_check_access_token
}
let
(
:json_response
)
{
JSON
.
parse
(
response
.
body
)
}
around
do
|
example
|
Dir
.
mktmpdir
do
|
tmp_dir
|
@metrics_multiproc_dir
=
tmp_dir
example
.
run
end
end
let
(
:metrics_multiproc_dir
)
{
Dir
.
mktmpdir
}
before
do
stub_env
(
'IN_MEMORY_APPLICATION_SETTINGS'
,
'false'
)
stub_env
(
'prometheus_multiproc_dir'
,
@
metrics_multiproc_dir
)
stub_env
(
'prometheus_multiproc_dir'
,
metrics_multiproc_dir
)
allow
(
Gitlab
::
Metrics
).
to
receive
(
:prometheus_metrics_enabled?
).
and_return
(
true
)
end
...
...
spec/lib/gitlab/metrics_spec.rb
View file @
1c59ba67
...
...
@@ -281,15 +281,10 @@ describe Gitlab::Metrics do
end
context
'prometheus metrics enabled'
do
around
do
|
example
|
Dir
.
mktmpdir
do
|
tmp_dir
|
@metrics_multiproc_dir
=
tmp_dir
example
.
run
end
end
let
(
:metrics_multiproc_dir
)
{
Dir
.
mktmpdir
}
before
do
stub_const
(
'Prometheus::Client::Multiprocdir'
,
@
metrics_multiproc_dir
)
stub_const
(
'Prometheus::Client::Multiprocdir'
,
metrics_multiproc_dir
)
allow
(
described_class
).
to
receive
(
:prometheus_metrics_enabled?
).
and_return
(
true
)
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