debian-mirror-gitlab/spec/support/helpers/gitlab_verify_helpers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
508 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-10-15 14:42:47 +05:30
module GitlabVerifyHelpers
def collect_ranges(args = {})
2021-02-22 17:27:13 +05:30
verifier = described_class.new(**args.merge(batch_size: 1))
2018-10-15 14:42:47 +05:30
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