diff options
Diffstat (limited to 'spec/support/helpers/ci')
-rw-r--r-- | spec/support/helpers/ci/partitioning_helpers.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/helpers/ci/partitioning_helpers.rb b/spec/support/helpers/ci/partitioning_helpers.rb new file mode 100644 index 00000000000..110199a3147 --- /dev/null +++ b/spec/support/helpers/ci/partitioning_helpers.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Ci + module PartitioningHelpers + def stub_current_partition_id(id = Ci::PartitioningTesting::PartitionIdentifiers.ci_testing_partition_id) + allow(::Ci::Pipeline) + .to receive(:current_partition_value) + .and_return(id) + end + end +end |