diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-18 09:11:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-18 09:11:01 +0300 |
commit | 514ace363222f19595375f59b123b5e27c2b9b8a (patch) | |
tree | 955d0b886197f5ae104fa29706084dc13061112f /spec/lib | |
parent | 25d4a24f831382d37fabc1b6dd3fde26a6c34d4b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/analytics/cycle_analytics/records_fetcher_spec.rb | 50 | ||||
-rw-r--r-- | spec/lib/gitlab/import_export/all_models.yml | 1 |
2 files changed, 1 insertions, 50 deletions
diff --git a/spec/lib/gitlab/analytics/cycle_analytics/records_fetcher_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/records_fetcher_spec.rb index ebc5ae2a632..4fe55ba0c0c 100644 --- a/spec/lib/gitlab/analytics/cycle_analytics/records_fetcher_spec.rb +++ b/spec/lib/gitlab/analytics/cycle_analytics/records_fetcher_spec.rb @@ -79,56 +79,6 @@ RSpec.describe Gitlab::Analytics::CycleAnalytics::RecordsFetcher do include_context 'when records are loaded by maintainer' end - - describe 'special case' do - let(:mr1) { create(:merge_request, source_project: project, allow_broken: true, created_at: 20.days.ago) } - let(:mr2) { create(:merge_request, source_project: project, allow_broken: true, created_at: 19.days.ago) } - let(:ci_build1) { create(:ci_build) } - let(:ci_build2) { create(:ci_build) } - let(:default_stages) { Gitlab::Analytics::CycleAnalytics::DefaultStages } - let(:stage) { build(:cycle_analytics_project_stage, default_stages.params_for_test_stage.merge(project: project)) } - - before do - mr1.metrics.update!({ - merged_at: 5.days.ago, - first_deployed_to_production_at: 1.day.ago, - latest_build_started_at: 5.days.ago, - latest_build_finished_at: 1.day.ago, - pipeline: ci_build1.pipeline - }) - mr2.metrics.update!({ - merged_at: 10.days.ago, - first_deployed_to_production_at: 5.days.ago, - latest_build_started_at: 9.days.ago, - latest_build_finished_at: 7.days.ago, - pipeline: ci_build2.pipeline - }) - - project.add_user(user, Gitlab::Access::MAINTAINER) - end - - context 'returns build records' do - shared_examples 'orders build records by `latest_build_finished_at`' do - it 'orders by `latest_build_finished_at`' do - build_ids = subject.map { |item| item[:id] } - - expect(build_ids).to eq([ci_build1.id, ci_build2.id]) - end - end - - context 'when requesting records for default test stage' do - include_examples 'orders build records by `latest_build_finished_at`' - end - - context 'when requesting records for default staging stage' do - before do - stage.assign_attributes(default_stages.params_for_staging_stage) - end - - include_examples 'orders build records by `latest_build_finished_at`' - end - end - end end describe 'pagination' do diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index 36eb1c04c81..2b7138a7a10 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -57,6 +57,7 @@ issues: - issue_email_participants - test_reports - requirement +- incident_management_issuable_escalation_status work_item_type: - issues events: |