summaryrefslogtreecommitdiff
path: root/spec/support/chunked_io/chunked_io_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/chunked_io/chunked_io_helpers.rb')
-rw-r--r--spec/support/chunked_io/chunked_io_helpers.rb11
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..fec1f951563
--- /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::BuildTraceChunk::CHUNK_SIZE', size)
+ stub_const('Gitlab::Ci::Trace::ChunkedIO::CHUNK_SIZE', size)
+ end
+end