Welcome to mirror list, hosted at ThFree Co, Russian Federation.

rspec_hooks.rb « partitioning_testing « ci « models « helpers « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8a1581d513af87230ddd5ba563280261e07794e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

RSpec.configure do |config|
  config.include ::Ci::PartitioningTesting::PartitionIdentifiers

  config.around(:each, :ci_partitionable) do |example|
    unless ::Ci::Build.table_name.to_s.starts_with?('p_')
      skip 'Skipping partitioning tests until `ci_builds` is partitioned'
    end

    ::Ci::PartitioningTesting::SchemaHelpers.with_routing_tables do
      example.run
    end
  end

  config.before(:all) do
    ::Ci::PartitioningTesting::SchemaHelpers.setup
  end

  config.after(:all) do
    ::Ci::PartitioningTesting::SchemaHelpers.teardown
  end
end