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
Boxiang Sun
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
15 deletions
+4
-15
spec/controllers/metrics_controller_spec.rb
spec/controllers/metrics_controller_spec.rb
+2
-8
spec/lib/gitlab/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
...
@@ -5,17 +5,11 @@ describe MetricsController do
let
(
:token
)
{
current_application_settings
.
health_check_access_token
}
let
(
:token
)
{
current_application_settings
.
health_check_access_token
}
let
(
:json_response
)
{
JSON
.
parse
(
response
.
body
)
}
let
(
:json_response
)
{
JSON
.
parse
(
response
.
body
)
}
let
(
:metrics_multiproc_dir
)
{
Dir
.
mktmpdir
}
around
do
|
example
|
Dir
.
mktmpdir
do
|
tmp_dir
|
@metrics_multiproc_dir
=
tmp_dir
example
.
run
end
end
before
do
before
do
stub_env
(
'IN_MEMORY_APPLICATION_SETTINGS'
,
'false'
)
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
)
allow
(
Gitlab
::
Metrics
).
to
receive
(
:prometheus_metrics_enabled?
).
and_return
(
true
)
end
end
...
...
spec/lib/gitlab/metrics_spec.rb
View file @
1c59ba67
...
@@ -281,15 +281,10 @@ describe Gitlab::Metrics do
...
@@ -281,15 +281,10 @@ describe Gitlab::Metrics do
end
end
context
'prometheus metrics enabled'
do
context
'prometheus metrics enabled'
do
around
do
|
example
|
let
(
:metrics_multiproc_dir
)
{
Dir
.
mktmpdir
}
Dir
.
mktmpdir
do
|
tmp_dir
|
@metrics_multiproc_dir
=
tmp_dir
example
.
run
end
end
before
do
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
)
allow
(
described_class
).
to
receive
(
:prometheus_metrics_enabled?
).
and_return
(
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