Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-14 03:09:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-14 03:09:07 +0300
commite144369009f3404072f7e0f969f7cded93195a01 (patch)
treed7a354e2c3c69a7ad65dc81aba8fe2ba59b0a26f /spec/features/markdown
parentd466ee5042520ad078fe050cb078d81dc2ebe196 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/markdown')
-rw-r--r--spec/features/markdown/metrics_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/features/markdown/metrics_spec.rb b/spec/features/markdown/metrics_spec.rb
index e7fec41fae3..69e93268b57 100644
--- a/spec/features/markdown/metrics_spec.rb
+++ b/spec/features/markdown/metrics_spec.rb
@@ -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