diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-14 00:09:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-14 00:09:07 +0000 |
commit | e144369009f3404072f7e0f969f7cded93195a01 (patch) | |
tree | d7a354e2c3c69a7ad65dc81aba8fe2ba59b0a26f /spec/features | |
parent | d466ee5042520ad078fe050cb078d81dc2ebe196 (diff) | |
download | gitlab-ce-e144369009f3404072f7e0f969f7cded93195a01.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/cycle_analytics_spec.rb | 6 | ||||
-rw-r--r-- | spec/features/markdown/metrics_spec.rb | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/spec/features/cycle_analytics_spec.rb b/spec/features/cycle_analytics_spec.rb index 666a45485b9..4a20d1b7d60 100644 --- a/spec/features/cycle_analytics_spec.rb +++ b/spec/features/cycle_analytics_spec.rb @@ -40,9 +40,6 @@ describe 'Value Stream Analytics', :js do context "when there's value stream analytics data" do before do - allow_next_instance_of(Gitlab::ReferenceExtractor) do |instance| - allow(instance).to receive(:issues).and_return([issue]) - end project.add_maintainer(user) @build = create_cycle(user, project, issue, mr, milestone, pipeline) @@ -101,9 +98,6 @@ describe 'Value Stream Analytics', :js do project.add_developer(user) project.add_guest(guest) - allow_next_instance_of(Gitlab::ReferenceExtractor) do |instance| - allow(instance).to receive(:issues).and_return([issue]) - end create_cycle(user, project, issue, mr, milestone, pipeline) deploy_master(user, project) 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 |