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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/ci/partitioning_helpers.rb')
-rw-r--r--spec/support/helpers/ci/partitioning_helpers.rb11
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