gitlab-org--gitlab-foss/spec/support/chunked_io/chunked_io_helpers.rb

14 lines
364 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2018-04-05 10:43:21 -04:00
module ChunkedIOHelpers
def sample_trace_raw
@sample_trace_raw ||= File.read(expand_fixture_path('trace/sample_trace'))
.force_encoding(Encoding::BINARY)
end
def stub_buffer_size(size)
stub_const('Ci::BuildTraceChunk::CHUNK_SIZE', size)
2018-04-05 10:43:21 -04:00
stub_const('Gitlab::Ci::Trace::ChunkedIO::CHUNK_SIZE', size)
end
end