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
f4406d8f
Commit
f4406d8f
authored
Feb 12, 2020
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear host memoization for feature test
parent
8bb85704
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
lib/gitlab/metrics/dashboard/url.rb
lib/gitlab/metrics/dashboard/url.rb
+1
-0
spec/features/markdown/metrics_spec.rb
spec/features/markdown/metrics_spec.rb
+10
-0
spec/lib/gitlab/metrics/dashboard/url_spec.rb
spec/lib/gitlab/metrics/dashboard/url_spec.rb
+1
-1
No files found.
lib/gitlab/metrics/dashboard/url.rb
View file @
f4406d8f
...
...
@@ -7,6 +7,7 @@ module Gitlab
class
Url
class
<<
self
include
Gitlab
::
Utils
::
StrongMemoize
# Matches urls for a metrics dashboard. This could be
# either the /metrics endpoint or the /metrics_dashboard
# endpoint.
...
...
spec/features/markdown/metrics_spec.rb
View file @
f4406d8f
...
...
@@ -93,10 +93,20 @@ describe 'Metrics rendering', :js, :use_clean_rails_memory_store_caching, :sidek
# Ensure we identify urls with the appropriate host.
# Configure host to include port in app:
Gitlab
.
config
.
gitlab
[
:url
]
=
root_url
.
chomp
(
'/'
)
clear_host_from_memoized_variables
end
def
restore_host
default_url_options
[
:host
]
=
@original_default_host
Gitlab
.
config
.
gitlab
[
:url
]
=
@original_gitlab_url
clear_host_from_memoized_variables
end
def
clear_host_from_memoized_variables
[
:metrics_regex
,
:grafana_regex
].
each
do
|
method_name
|
Gitlab
::
Metrics
::
Dashboard
::
Url
.
clear_memoization
(
method_name
)
end
end
end
spec/lib/gitlab/metrics/dashboard/url_spec.rb
View file @
f4406d8f
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
Gitlab
::
Metrics
::
Dashboard
::
Url
do
describe
'#regex'
do
describe
'#
metrics_
regex'
do
let
(
:url
)
do
Gitlab
::
Routing
.
url_helpers
.
metrics_namespace_project_environment_url
(
'foo'
,
...
...
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