diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-04-05 17:06:07 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-04-05 17:06:07 +0900 |
commit | 3c6ab8997bb3b5c1b6a48bef744d5b528d05de61 (patch) | |
tree | 8796badf74067fef750769ef85773c93f6b681ee /spec/support/chunked_io | |
parent | 446086f18c83dbfe12675a6f186e82cc04bac0f3 (diff) | |
download | gitlab-ce-3c6ab8997bb3b5c1b6a48bef744d5b528d05de61.tar.gz |
Remove unrelated specs
Diffstat (limited to 'spec/support/chunked_io')
-rw-r--r-- | spec/support/chunked_io/chunked_io_helpers.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/spec/support/chunked_io/chunked_io_helpers.rb b/spec/support/chunked_io/chunked_io_helpers.rb deleted file mode 100644 index e9dd2e77538..00000000000 --- a/spec/support/chunked_io/chunked_io_helpers.rb +++ /dev/null @@ -1,32 +0,0 @@ -module ChunkedIOHelpers - def fill_trace_to_chunks(data) - stream = described_class.new(job_id, nil, 'a+b') - stream.write(data) - stream.close - end - - def sample_trace_raw - # ChunkStore::Database doesn't support appending, so the test data size has to be least common multiple - if chunk_stores.first == Gitlab::Ci::Trace::ChunkedFile::ChunkStore::Database - '01234567' * 32 # 256 bytes - else - File.read(expand_fixture_path('trace/sample_trace')) - end - end - - def set_smaller_buffer_size_than(file_size) - blocks = (file_size / 128) - new_size = (blocks / 2) * 128 - allow_any_instance_of(described_class).to receive(:buffer_size).and_return(new_size) - end - - def set_larger_buffer_size_than(file_size) - blocks = (file_size / 128) - new_size = (blocks * 2) * 128 - allow_any_instance_of(described_class).to receive(:buffer_size).and_return(new_size) - end - - def set_half_buffer_size_of(file_size) - allow_any_instance_of(described_class).to receive(:buffer_size).and_return(file_size / 2) - end -end |