From 76623c12c136f43f24c3966ed4b469e2c0b434b7 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 5 Feb 2020 21:09:02 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../background_migration/populate_untracked_uploads_spec.rb | 2 +- .../gitlab/background_migration/prepare_untracked_uploads_spec.rb | 2 +- .../background_migration/schedule_calculate_wiki_sizes_spec.rb | 2 +- spec/lib/gitlab/background_migration_spec.rb | 8 ++++---- spec/lib/gitlab/database/migration_helpers_spec.rb | 6 +++--- spec/lib/gitlab/etag_caching/router_spec.rb | 2 +- spec/lib/gitlab/hashed_storage/migrator_spec.rb | 2 +- spec/lib/gitlab/import_export/all_models.yml | 1 + spec/lib/gitlab/sidekiq_versioning_spec.rb | 2 +- spec/lib/gitlab/url_builder_spec.rb | 6 +++--- 10 files changed, 17 insertions(+), 16 deletions(-) (limited to 'spec/lib') diff --git a/spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb b/spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb index 44f537ca8dd..f25804c3ca2 100644 --- a/spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb +++ b/spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' # Rollback DB to 10.5 (later than this was originally written for) because it still needs to work. -describe Gitlab::BackgroundMigration::PopulateUntrackedUploads, :sidekiq, :migration, schema: 20180208183958 do +describe Gitlab::BackgroundMigration::PopulateUntrackedUploads, :migration, schema: 20180208183958 do include MigrationsHelpers::TrackUntrackedUploadsHelpers subject { described_class.new } diff --git a/spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb b/spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb index 591368ee98e..9072431e8f6 100644 --- a/spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb +++ b/spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' # Rollback DB to 10.5 (later than this was originally written for) because it still needs to work. -describe Gitlab::BackgroundMigration::PrepareUntrackedUploads, :sidekiq, :migration, schema: 20180208183958 do +describe Gitlab::BackgroundMigration::PrepareUntrackedUploads, :migration, schema: 20180208183958 do include MigrationsHelpers::TrackUntrackedUploadsHelpers let!(:untracked_files_for_uploads) { table(:untracked_files_for_uploads) } diff --git a/spec/lib/gitlab/background_migration/schedule_calculate_wiki_sizes_spec.rb b/spec/lib/gitlab/background_migration/schedule_calculate_wiki_sizes_spec.rb index 399db4ac259..cee9a3e8822 100644 --- a/spec/lib/gitlab/background_migration/schedule_calculate_wiki_sizes_spec.rb +++ b/spec/lib/gitlab/background_migration/schedule_calculate_wiki_sizes_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require Rails.root.join('db', 'post_migrate', '20190527194900_schedule_calculate_wiki_sizes.rb') -describe ScheduleCalculateWikiSizes, :migration, :sidekiq do +describe ScheduleCalculateWikiSizes, :migration do let(:migration_class) { Gitlab::BackgroundMigration::CalculateWikiSizes } let(:migration_name) { migration_class.to_s.demodulize } diff --git a/spec/lib/gitlab/background_migration_spec.rb b/spec/lib/gitlab/background_migration_spec.rb index 66a0b11606f..9546550bfc5 100644 --- a/spec/lib/gitlab/background_migration_spec.rb +++ b/spec/lib/gitlab/background_migration_spec.rb @@ -76,7 +76,7 @@ describe Gitlab::BackgroundMigration do end end - context 'when there are scheduled jobs present', :sidekiq, :redis do + context 'when there are scheduled jobs present', :redis do it 'steals all jobs from the scheduled sets' do Sidekiq::Testing.disable! do BackgroundMigrationWorker.perform_in(10.minutes, 'Object') @@ -91,7 +91,7 @@ describe Gitlab::BackgroundMigration do end end - context 'when there are enqueued and scheduled jobs present', :sidekiq, :redis do + context 'when there are enqueued and scheduled jobs present', :redis do it 'steals from the scheduled sets queue first' do Sidekiq::Testing.disable! do expect(described_class).to receive(:perform) @@ -107,7 +107,7 @@ describe Gitlab::BackgroundMigration do end end - context 'when retry_dead_jobs is true', :sidekiq, :redis do + context 'when retry_dead_jobs is true', :redis do let(:retry_queue) do [double(args: ['Object', [3]], queue: described_class.queue, delete: true)] end @@ -186,7 +186,7 @@ describe Gitlab::BackgroundMigration do end end - context 'when there are scheduled jobs present', :sidekiq, :redis do + context 'when there are scheduled jobs present', :redis do before do Sidekiq::Testing.disable! do BackgroundMigrationWorker.perform_in(10.minutes, 'Foo') diff --git a/spec/lib/gitlab/database/migration_helpers_spec.rb b/spec/lib/gitlab/database/migration_helpers_spec.rb index 7a8e79fecb1..4cf2553b90d 100644 --- a/spec/lib/gitlab/database/migration_helpers_spec.rb +++ b/spec/lib/gitlab/database/migration_helpers_spec.rb @@ -1158,7 +1158,7 @@ describe Gitlab::Database::MigrationHelpers do end end - describe 'sidekiq migration helpers', :sidekiq, :redis do + describe 'sidekiq migration helpers', :redis do let(:worker) do Class.new do include Sidekiq::Worker @@ -1221,7 +1221,7 @@ describe Gitlab::Database::MigrationHelpers do end end - describe '#bulk_queue_background_migration_jobs_by_range', :sidekiq do + describe '#bulk_queue_background_migration_jobs_by_range' do context 'when the model has an ID column' do let!(:id1) { create(:user).id } let!(:id2) { create(:user).id } @@ -1293,7 +1293,7 @@ describe Gitlab::Database::MigrationHelpers do end end - describe '#queue_background_migration_jobs_by_range_at_intervals', :sidekiq do + describe '#queue_background_migration_jobs_by_range_at_intervals' do context 'when the model has an ID column' do let!(:id1) { create(:user).id } let!(:id2) { create(:user).id } diff --git a/spec/lib/gitlab/etag_caching/router_spec.rb b/spec/lib/gitlab/etag_caching/router_spec.rb index 4cbabb5ad8d..b69e4668d61 100644 --- a/spec/lib/gitlab/etag_caching/router_spec.rb +++ b/spec/lib/gitlab/etag_caching/router_spec.rb @@ -59,7 +59,7 @@ describe Gitlab::EtagCaching::Router do it 'matches commit pipelines endpoint' do result = described_class.match( - '/my-group/my-project/commit/aa8260d253a53f73f6c26c734c72fdd600f6e6d4/pipelines.json' + '/my-group/my-project/-/commit/aa8260d253a53f73f6c26c734c72fdd600f6e6d4/pipelines.json' ) expect(result).to be_present diff --git a/spec/lib/gitlab/hashed_storage/migrator_spec.rb b/spec/lib/gitlab/hashed_storage/migrator_spec.rb index ce7f2c4530d..f3cbb811679 100644 --- a/spec/lib/gitlab/hashed_storage/migrator_spec.rb +++ b/spec/lib/gitlab/hashed_storage/migrator_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::HashedStorage::Migrator, :sidekiq, :redis do +describe Gitlab::HashedStorage::Migrator, :redis do describe '#bulk_schedule_migration' do it 'schedules job to HashedStorage::MigratorWorker' do Sidekiq::Testing.fake! do diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index 22c2fc5545e..81f6138e2bf 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -215,6 +215,7 @@ ci_pipelines: - vulnerabilities_occurrence_pipelines - vulnerability_findings - pipeline_config +- security_scans pipeline_variables: - pipeline stages: diff --git a/spec/lib/gitlab/sidekiq_versioning_spec.rb b/spec/lib/gitlab/sidekiq_versioning_spec.rb index dade5961775..11c866894c2 100644 --- a/spec/lib/gitlab/sidekiq_versioning_spec.rb +++ b/spec/lib/gitlab/sidekiq_versioning_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::SidekiqVersioning, :sidekiq, :redis do +describe Gitlab::SidekiqVersioning, :redis do let(:foo_worker) do Class.new do def self.name diff --git a/spec/lib/gitlab/url_builder_spec.rb b/spec/lib/gitlab/url_builder_spec.rb index d349c2928b0..49011b100ab 100644 --- a/spec/lib/gitlab/url_builder_spec.rb +++ b/spec/lib/gitlab/url_builder_spec.rb @@ -10,7 +10,7 @@ describe Gitlab::UrlBuilder do url = described_class.build(commit) - expect(url).to eq "#{Settings.gitlab['url']}/#{commit.project.full_path}/commit/#{commit.id}" + expect(url).to eq "#{Settings.gitlab['url']}/#{commit.project.full_path}/-/commit/#{commit.id}" end end @@ -86,7 +86,7 @@ describe Gitlab::UrlBuilder do url = described_class.build(note) - expect(url).to eq "#{Settings.gitlab['url']}/#{note.project.full_path}/commit/#{note.commit_id}#note_#{note.id}" + expect(url).to eq "#{Settings.gitlab['url']}/#{note.project.full_path}/-/commit/#{note.commit_id}#note_#{note.id}" end end @@ -96,7 +96,7 @@ describe Gitlab::UrlBuilder do url = described_class.build(note) - expect(url).to eq "#{Settings.gitlab['url']}/#{note.project.full_path}/commit/#{note.commit_id}#note_#{note.id}" + expect(url).to eq "#{Settings.gitlab['url']}/#{note.project.full_path}/-/commit/#{note.commit_id}#note_#{note.id}" end end -- cgit v1.2.3