Revert "Make sure TraceReader uses Encoding.default_external"
This reverts commit e9d8fc94e6
.
This commit is contained in:
parent
e9d8fc94e6
commit
ac6e202f46
2 changed files with 2 additions and 15 deletions
|
@ -42,7 +42,6 @@ module Gitlab
|
|||
end
|
||||
|
||||
chunks.join.lines.last(max_lines).join
|
||||
.force_encoding(Encoding.default_external)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,25 +11,13 @@ describe Gitlab::Ci::TraceReader do
|
|||
last_lines = random_lines
|
||||
|
||||
expected = lines.last(last_lines).join
|
||||
result = subject.read(last_lines: last_lines)
|
||||
|
||||
expect(result).to eq(expected)
|
||||
expect(result.encoding).to eq(Encoding.default_external)
|
||||
expect(subject.read(last_lines: last_lines)).to eq(expected)
|
||||
end
|
||||
end
|
||||
|
||||
it 'returns everything if trying to get too many lines' do
|
||||
result = build_subject.read(last_lines: lines.size * 2)
|
||||
|
||||
expect(result).to eq(lines.join)
|
||||
expect(result.encoding).to eq(Encoding.default_external)
|
||||
end
|
||||
|
||||
it 'returns all contents if last_lines is not specified' do
|
||||
result = build_subject.read
|
||||
|
||||
expect(result).to eq(lines.join)
|
||||
expect(result.encoding).to eq(Encoding.default_external)
|
||||
expect(build_subject.read(last_lines: lines.size * 2)).to eq(lines.join)
|
||||
end
|
||||
|
||||
it 'raises an error if not passing an integer for last_lines' do
|
||||
|
|
Loading…
Reference in a new issue