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
124e4c4f
Commit
124e4c4f
authored
Mar 16, 2021
by
Piotr Skorupa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make rubocop happy
- Use instance variables - Remove redundant one-character regex classes
parent
5901dcac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/usage/metric_definition.rb
lib/gitlab/usage/metric_definition.rb
+2
-2
spec/lib/generators/gitlab/usage_metric_definition/redis_hll_generator_spec.rb
...itlab/usage_metric_definition/redis_hll_generator_spec.rb
+2
-2
No files found.
lib/gitlab/usage/metric_definition.rb
View file @
124e4c4f
...
...
@@ -42,7 +42,7 @@ module Gitlab
end
def
definitions
(
skip_validation:
false
)
@
@
skip_validation
=
skip_validation
@skip_validation
=
skip_validation
@definitions
||=
load_all!
end
...
...
@@ -88,7 +88,7 @@ module Gitlab
end
def
skip_validation?
!!
attributes
[
:skip_validation
]
||
@
@
skip_validation
!!
attributes
[
:skip_validation
]
||
@skip_validation
end
end
end
...
...
spec/lib/generators/gitlab/usage_metric_definition/redis_hll_generator_spec.rb
View file @
124e4c4f
...
...
@@ -13,14 +13,14 @@ RSpec.describe Gitlab::UsageMetricDefinition::RedisHllGenerator do
before
do
stub_const
(
"
#{
Gitlab
::
UsageMetricDefinitionGenerator
}
::TOP_LEVEL_DIR"
,
temp_dir
)
# Stub Prometheus requests from Gitlab::Utils::UsageData
stub_request
(
:get
,
%r{^http
[s]
?://::1:9090/-/ready}
)
stub_request
(
:get
,
%r{^http
s
?://::1:9090/-/ready}
)
.
to_return
(
status:
200
,
body:
[{}].
to_json
,
headers:
{
'Content-Type'
=>
'application/json'
}
)
stub_request
(
:get
,
%r{^http
[s]
?://::1:9090/api/v1/query
\?
query=.*}
)
stub_request
(
:get
,
%r{^http
s
?://::1:9090/api/v1/query
\?
query=.*}
)
.
to_return
(
status:
200
,
body:
[{}].
to_json
,
...
...
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