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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
4f600340
Commit
4f600340
authored
Aug 07, 2019
by
Peter Leitzen
Committed by
Sean McGivern
Aug 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean tmpdirs in metrics endpoint specs
parent
3c29ea01
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
spec/controllers/metrics_controller_spec.rb
spec/controllers/metrics_controller_spec.rb
+8
-1
No files found.
spec/controllers/metrics_controller_spec.rb
View file @
4f600340
...
...
@@ -5,12 +5,19 @@ require 'spec_helper'
describe
MetricsController
do
include
StubENV
let
(
:metrics_multiproc_dir
)
{
Dir
.
mktmp
dir
}
let
(
:metrics_multiproc_dir
)
{
@metrics_multiproc_
dir
}
let
(
:whitelisted_ip
)
{
'127.0.0.1'
}
let
(
:whitelisted_ip_range
)
{
'10.0.0.0/24'
}
let
(
:ip_in_whitelisted_range
)
{
'10.0.0.1'
}
let
(
:not_whitelisted_ip
)
{
'10.0.1.1'
}
around
do
|
example
|
Dir
.
mktmpdir
do
|
path
|
@metrics_multiproc_dir
=
path
example
.
run
end
end
before
do
stub_env
(
'IN_MEMORY_APPLICATION_SETTINGS'
,
'false'
)
allow
(
Prometheus
::
Client
.
configuration
).
to
receive
(
:multiprocess_files_dir
).
and_return
(
metrics_multiproc_dir
)
...
...
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