gitlab-org--gitlab-foss/spec/support/helpers/gitlab_verify_helpers.rb

27 lines
508 B
Ruby

# frozen_string_literal: true
module GitlabVerifyHelpers
def collect_ranges(args = {})
verifier = described_class.new(**args.merge(batch_size: 1))
collect_results(verifier).map { |range, _| range }
end
def collect_failures
verifier = described_class.new(batch_size: 1)
out = {}
collect_results(verifier).map { |_, failures| out.merge!(failures) }
out
end
def collect_results(verifier)
out = []
verifier.run_batches { |*args| out << args }
out
end
end