diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /spec/migrations/schedule_migrate_shared_vulnerability_scanners_spec.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'spec/migrations/schedule_migrate_shared_vulnerability_scanners_spec.rb')
-rw-r--r-- | spec/migrations/schedule_migrate_shared_vulnerability_scanners_spec.rb | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/spec/migrations/schedule_migrate_shared_vulnerability_scanners_spec.rb b/spec/migrations/schedule_migrate_shared_vulnerability_scanners_spec.rb deleted file mode 100644 index f00d6568b67..00000000000 --- a/spec/migrations/schedule_migrate_shared_vulnerability_scanners_spec.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -require "spec_helper" - -require_migration! - -RSpec.describe ScheduleMigrateSharedVulnerabilityScanners, :migration do - describe "#up" do - before do - migrate! - end - - it "schedules" do - expect(described_class::MIGRATION).to have_scheduled_batched_migration( - table_name: described_class::TABLE_NAME, - column_name: described_class::BATCH_COLUMN, - interval: described_class::DELAY_INTERVAL, - batch_size: described_class::BATCH_SIZE, - max_batch_size: described_class::BATCH_SIZE, - sub_batch_size: described_class::SUB_BATCH_SIZE, - gitlab_schema: :gitlab_main - ) - end - - describe "ID range" do - let(:expected_range) do - { min_value: described_class::BATCH_MIN_VALUE, - max_value: described_class::BATCH_MAX_VALUE } - end - - subject do - Gitlab::Database::BackgroundMigration::BatchedMigration - .for_configuration(:gitlab_main, - described_class::MIGRATION, - described_class::TABLE_NAME, - described_class::BATCH_COLUMN, - []) - end - - it "is set" do - # The `have_scheduled_batched_migration` matcher accepts the - # `batch_min_value` and `batch_max_value` keywords. However the respective - # column names are `min_value` and `max_value`. Hence the matcher cannot - # be used in this case, as it asserts the wrong attributes. - expect(subject).to all(have_attributes(expected_range)) - end - end - end - - describe '#down' do - before do - schema_migrate_down! - end - - it "deletes" do - expect(described_class::MIGRATION).not_to have_scheduled_batched_migration - end - end -end |