diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-04-05 23:43:21 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-04-05 23:43:21 +0900 |
commit | b94c84e597c02a6c38cb8f5233c77dc0b15a7c4e (patch) | |
tree | d04a688f6c44c7b99bdadc112eb0242a6194b480 /spec/support/chunked_io | |
parent | f8f62ea5b6e81162cfb8781730040e54993cd847 (diff) | |
download | gitlab-ce-b94c84e597c02a6c38cb8f5233c77dc0b15a7c4e.tar.gz |
Add spec for ChunkedIO
Diffstat (limited to 'spec/support/chunked_io')
-rw-r--r-- | spec/support/chunked_io/chunked_io_helpers.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/chunked_io/chunked_io_helpers.rb b/spec/support/chunked_io/chunked_io_helpers.rb new file mode 100644 index 00000000000..a95eb87d7b8 --- /dev/null +++ b/spec/support/chunked_io/chunked_io_helpers.rb @@ -0,0 +1,11 @@ +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::JobTraceChunk::CHUNK_SIZE', size) + stub_const('Gitlab::Ci::Trace::ChunkedIO::CHUNK_SIZE', size) + end +end |