From e144369009f3404072f7e0f969f7cded93195a01 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 14 Feb 2020 00:09:07 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/features/markdown/metrics_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spec/features/markdown') 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 -- cgit v1.2.3